GithubHelp home page GithubHelp logo

mkraposhin / maddy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from progsource/maddy

0.0 0.0 0.0 80 KB

C++ Markdown to HTML header-only parser library

License: MIT License

C++ 96.62% CMake 3.38%

maddy's Introduction

maddy

License: MIT Version: 1.1.2 Travis Build Status Appveyor Build Status

maddy is a C++ Markdown to HTML header-only parser library.

Supported OS

It actually should work on any OS, that supports the C++14 standard library.

It is tested to work on:

  • Linux (gcc)
  • OSX (clang)
  • Windows (Visual Studio 2017)

Dependencies

  • C++14

Why maddy?

When I was needing a Markdown parser in C++ I couldn't find any, that was fitting my needs. So I simply wrote my own one.

Markdown syntax

The supported syntax can be found in the definitions docs.

How to use

To use maddy in your project, simply add the include path of maddy to yours and in the code, you can then do the following:

#include <memory>
#include <string>

#include "maddy/parser.h"

std::stringstream markdownInput("");

// config is optional
std::shared_ptr<maddy::ParserConfig> config = std::make_shared<maddy::ParserConfig>();
config->isEmphasizedParserEnabled = true; // default
config->isHTMLWrappedInParagraph = true; // default

std::shared_ptr<maddy::Parser> parser = std::make_shared<maddy::Parser>(config);
std::string htmlOutput = parser->Parse(markdownInput);

How to run the tests

(tested on Linux with git and cmake installed)

Open your preferred terminal and type:

git clone https://github.com/progsource/maddy.git
cd maddy
git submodule update --init --recursive
mkdir tmp
cd tmp
cmake ..
make
make test # or run the executable in ../build/MaddyTests

How to contribute

There are different possibilities:

  • Create a GitHub issue
  • Create a pull request with an own branch (don't forget to put yourself in the AUTHORS file)

Please also read CONTRIBUTING.md.

maddy's People

Contributors

progsource avatar patrickelectric avatar martin357 avatar crtxcr avatar solodolo avatar eklitzke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.