/markdownpp

A C++ Markdown solution.

Primary LanguageCSSMIT LicenseMIT

Markdown++

GitHub license

Markdown++ is a first-of-its-kind Markdown solution for C++. It unifies and handles all aspects of a modern, powerful and flexible Markdown tool including:

  • Markdown conversion with a sweet object-oriented interface.
  • LaTeX integration for all things math.
  • Syntax highlighting with highlight.js and its 65 themes.
  • 8 Markdown themes, such as GitHub's or Solarized.
  • A command-line program accompanying the library.

Usage

#include "markdown-parser.hpp"

int main(int argc, const char* argv[])
{
	// Main interface
	Markdown::Parser parser;

	// Flexible key-value configuration
	parser.configure("markdown-style", "solarized-dark");

	// Quick and easy snippet-conversion, returns HTML as std::string
	// <p><em>hello</em></p>
	auto snippet = parser.snippet("*hello*");

	// 65 possible styles (using highlight.js)
	parser.configure("code-style", "monokai");

	// Full file rendering
	parser.render_file("input.md", "output.html");
}

or

$ markdownpp -m solarized-dark -c monokai input.md output.html

Demo

See this README rendered by markdown++ with the solarized-dark markdown-theme and xcode syntax-theme here.

Documentation

You can build extensive documentation with doxygen. See the doxyfile in the docs/ folder. There are also some example programs in the examples folder.

LICENSE

This project is released under the MIT License. For more information, see the LICENSE file.

Authors

Peter Goldsborough + cat ❤️