diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 43d827d..a95f2e2 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -25,6 +25,7 @@ jobs: - name: run tests run: | ./build/MaddyTests + test-on-windows: runs-on: windows-latest steps: @@ -42,6 +43,7 @@ jobs: - name: run tests run: | ./build/Debug/MaddyTests.exe + test-on-osx: runs-on: macos-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index bde4c15..53c160f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,11 +20,12 @@ maddy uses [semver versioning](https://semver.org/). * ![**CHANGED**](https://img.shields.io/badge/-CHANGED-%23e90) gtest is now loaded via cmake and not a git submodule any longer - updated gtest version to 1.13.0 * ![**CHANGED**](https://img.shields.io/badge/-CHANGED-%23e90) tests are only run if the cmake option `MADDY_BUILD_WITH_TESTS` is on, moved test cmake code to the `tests` subfolder * ![**REMOVED**](https://img.shields.io/badge/-REMOVED-%23900) travis CI and appveyor -* ![**ADDED**](https://img.shields.io/badge/-ADDED-%23099) GitHub workflow +* ![**ADDED**](https://img.shields.io/badge/-ADDED-%23099) GitHub workflow for tests * ![**DEPRECATED**](https://img.shields.io/badge/-DEPRECATED-%23666) config flags `isEmphasizedParserEnabled` and `isHTMLWrappedInParagraph` * ![**ADDED**](https://img.shields.io/badge/-ADDED-%23099) config flag `enabledParsers` to en-/disable each parser separately * ![**ADDED**](https://img.shields.io/badge/-ADDED-%23099) class attribute to code blocks if there is text after the three backticks like ` ```cpp` * ![**ADDED**](https://img.shields.io/badge/-ADDED-%23099) optional support for latex blocks - it's off by default +* ![**ADDED**](https://img.shields.io/badge/-ADDED-%23099) version info to the parser class * ? ## version 1.1.2 2020-10-04 diff --git a/README.md b/README.md index e519324..91adfd5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # maddy [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Version: 1.1.2](https://img.shields.io/badge/Version-1.1.2-brightgreen.svg)](https://semver.org/) +[![Version: 1.2.0](https://img.shields.io/badge/Version-1.1.2-brightgreen.svg)](https://semver.org/) maddy is a C++ Markdown to HTML **header-only** parser library. @@ -45,8 +45,8 @@ std::stringstream markdownInput(""); std::shared_ptr config = std::make_shared(); // config->isEmphasizedParserEnabled = false; // default true - this flag is deprecated // config->isHTMLWrappedInParagraph = false; // default true - this flag is deprecated -config->enabledParsers &= ~maddy::types::EMPHASIZED_PARSER; -config->enabledParsers |= maddy::types::HTML_PARSER; +config->enabledParsers &= ~maddy::types::EMPHASIZED_PARSER; // equivalent to !isEmphasizedParserEnabled +config->enabledParsers |= maddy::types::HTML_PARSER; // equivalent to !isHTMLWrappedInParagraph std::shared_ptr parser = std::make_shared(config); std::string htmlOutput = parser->Parse(markdownInput); @@ -77,7 +77,6 @@ make test # or run the executable in ../build/MaddyTests There are different possibilities: * [Create a GitHub issue](https://github.com/progsource/maddy/issues/new) -* Create a pull request with an own branch (don't forget to put yourself in the - AUTHORS file) +* Create a pull request with an own branch Please also read [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/include/maddy/parser.h b/include/maddy/parser.h index 1ae8377..e1891bc 100644 --- a/include/maddy/parser.h +++ b/include/maddy/parser.h @@ -51,6 +51,14 @@ namespace maddy { class Parser { public: + /** + * Version info + * + * Check https://github.com/progsource/maddy/blob/master/CHANGELOG.md + * for the changelog. + */ + static const std::string VERSION() { static const std::string v = "1.2.0"; return v; } + /** * ctor *