diff --git a/.github/ISSUE_TEMPLATE/cpp-bug-report.yml b/.github/ISSUE_TEMPLATE/cpp-bug-report.yml index ab722be..a1c402f 100644 --- a/.github/ISSUE_TEMPLATE/cpp-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/cpp-bug-report.yml @@ -37,7 +37,8 @@ body: label: maddy version description: What version of maddy are you using? options: - - 1.4.0 (latest) + - 1.5.0 (latest) + - 1.4.0 - 1.3.0 - 1.2.1 - 1.2.0 diff --git a/.github/ISSUE_TEMPLATE/markdown-bug-report.yml b/.github/ISSUE_TEMPLATE/markdown-bug-report.yml index 12c8242..2ce857f 100644 --- a/.github/ISSUE_TEMPLATE/markdown-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/markdown-bug-report.yml @@ -37,7 +37,8 @@ body: label: maddy version description: What version of maddy are you using? options: - - 1.4.0 (latest) + - 1.5.0 (latest) + - 1.4.0 - 1.3.0 - 1.2.1 - 1.2.0 diff --git a/.github/workflows/create-release-package.yml b/.github/workflows/create-release-package.yml index c948c89..f445e07 100644 --- a/.github/workflows/create-release-package.yml +++ b/.github/workflows/create-release-package.yml @@ -40,9 +40,10 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: build/maddy-src.zip tag: ${{ github.ref }} + release_name: ${{ github.ref }} body: | ${{ steps.tag-message.outputs.message }} --- - You can find all changes of this release in the [changelog](https://github.com/progsource/maddy/blob/master/CHANGELOG.md) + [full changelog](https://github.com/progsource/maddy/blob/master/CHANGELOG.md) diff --git a/.github/workflows/run-checks.yml b/.github/workflows/run-checks.yml index 9e744f4..7f65118 100644 --- a/.github/workflows/run-checks.yml +++ b/.github/workflows/run-checks.yml @@ -5,9 +5,6 @@ on: branches: - master pull_request: - pull_request_target: - branches: - - master jobs: run-clang-format: runs-on: ubuntu-24.04 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index d80d3f3..b118bec 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -5,9 +5,6 @@ on: branches: - master pull_request: - pull_request_target: - branches: - - master jobs: test-on-ubuntu: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f90e38..63c0fca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ maddy uses [semver versioning](https://semver.org/). ## Upcoming +* ... + +## version 1.5.0 2025-04-21 + *  Correctly parse links with title text, i.e. `[link](http://example.com "example")`. *  Do not create invalid URLs from links with spaces, i.e. `[link](/ABC/some file)`. *  Do not create invalid HTML from links with quotes, i.e. `[link](/ABC/some"file)`. diff --git a/LICENSE b/LICENSE index 4f4e581..1694b74 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2017, 2018, 2019, 2020, 2023 M. Petra Baranski +Copyright M. Petra Baranski (for contributors see AUTHORS file) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index eb6a2c4..486c671 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # maddy [](https://opensource.org/licenses/MIT) -[](https://semver.org/) +[](https://semver.org/) maddy is a C++ Markdown to HTML **header-only** parser library. diff --git a/bench/CMakeLists.txt b/bench/CMakeLists.txt index 5665411..d8fc0ec 100644 --- a/bench/CMakeLists.txt +++ b/bench/CMakeLists.txt @@ -35,6 +35,10 @@ file(GLOB_RECURSE MADDY_BENCHMARK_FILES # ------------------------------------------------------------------------------ +add_compile_definitions(CURRENT_FILE_PATH="${CMAKE_CURRENT_SOURCE_DIR}") + +# ------------------------------------------------------------------------------ + add_executable( maddy_benchmark ${MADDY_BENCHMARK_FILES} diff --git a/bench/benchmark_test.md b/bench/benchmark_test.md new file mode 100644 index 0000000..e10807d --- /dev/null +++ b/bench/benchmark_test.md @@ -0,0 +1,416 @@ +# Benchmark test file + +This file is for the benchmark testing. + +--- + +This specification defines which markdown syntax can be parsed by maddy. +There is no HTML allowed in the markdown syntax - or said otherwise - it might +destroy the output, if there was HTML in your markdown. + +The Parser expects you to use spaces and not tabs for indentation in the +markdown. + +If a line starts with `<` and `config->enabledParsers |= maddy::types::HTML_PARSER;` +is set, it expects that the upcoming line is HTML and therefor will not be +surrounded by a paragraph. + +## Headlines + +``` +# h1 heading +## h2 heading +### h3 heading +#### h4 heading +##### h5 heading +###### h6 heading +``` +results in: +```html +
+some code
+
+```
+
+ ```cpp
+ int a = 42;
+ ```
+
+results in
+
+```html
+
+int a = 42;
+
+```
+
+## Inline code
+
+ some text `some inline code` some other text
+
+results in
+```html
+some text some inline code some other text
+```
+
+## quotes
+
+```
+> Some quote
+```
+results in
+```html
+Some quote
+ +``` + +## bold + +``` +**bold text** +__bold text__ +``` +results in +```html +bold text +bold text +``` + +## italic + +``` +*italic text* +``` +results in +```html +italic text +``` + +## emphasized + +This can be disabled by setting `config->enabledParsers &= ~maddy::types::EMPHASIZED_PARSER;`. + +``` +_emphasized text_ +``` +results in +```html +emphasized text +``` + +## strikethrough + +``` +~~striked through text~~ +``` +results in +```html +
+```
+
+## Tables
+
+```
+
+|table>
+Left header | middle header | last header
+- | - | -
+cell 1 | cell 2 | cell 3
+cell 4 | cell 5 | cell 6
+- | - | -
+foot a | foot b | foot c
+|| Left header | +middle header | +last header | +
|---|---|---|
| cell 1 | +cell 2 | +cell 3 | +
| cell 4 | +cell 5 | +cell 6 | +
| foot a | +foot b | +foot c | +