1
0
peilaus alkaen https://github.com/quitesimpleorg/qsmaddy.git synced 2024-11-25 00:32:36 +01:00
Fork of maddy, a C++ Markdown to HTML header-only parser library.
Go to file
Albert S 2f14336692 italicparser: Parse(): Add static keyword to regex
In line with the other parsers, add the static keyword to the
regex.
2021-04-18 11:40:15 +02:00
docs orderedlistparser: Add parsing support for fully numeric markdown lists 2020-10-03 17:22:21 -05:00
include/maddy italicparser: Parse(): Add static keyword to regex 2021-04-18 11:40:15 +02:00
libs gtest: Use the last release version release-1.10.0 2019-12-04 09:15:56 -03:00
tests orderedlistparser: Add parsing support for fully numeric markdown lists 2020-10-03 17:22:21 -05:00
.editorconfig init submodules for appveyor 2019-02-19 02:09:23 +01:00
.gitignore initial release 1.0.0 2017-12-25 12:22:35 +01:00
.gitmodules initial release 1.0.0 2017-12-25 12:22:35 +01:00
.travis.yml Improved cmake setup 2020-10-04 19:02:39 +02:00
appveyor.yml appveyor - use debug 2019-02-19 02:43:15 +01:00
AUTHORS Merge branch 'master' into numeric-list 2020-10-04 18:31:29 +02:00
CHANGELOG.md cleaned up Changelog colors 2020-10-10 08:08:35 +02:00
CMakeLists.txt Improved cmake setup 2020-10-04 19:02:39 +02:00
CONTRIBUTING.md Added CHANGELOG and CONTRIBUTING 2020-10-10 08:03:21 +02:00
ISSUE_TEMPLATE.md Created Github issue template 2017-12-25 13:45:45 +01:00
LICENSE Improved cmake setup 2020-10-04 19:02:39 +02:00
README.md fixed spelling in README 2020-10-10 08:11:48 +02:00

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.