multimark 0.1.3__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- multimark-0.3.2/.github/CONTRIBUTING.md +85 -0
- {multimark-0.1.3 → multimark-0.3.2}/.github/ISSUE_TEMPLATE/bug.md +2 -2
- {multimark-0.1.3 → multimark-0.3.2}/.github/ISSUE_TEMPLATE/feature.md +2 -2
- {multimark-0.1.3 → multimark-0.3.2}/.github/ISSUE_TEMPLATE/question.md +2 -2
- {multimark-0.1.3 → multimark-0.3.2}/.github/workflows/ci.yml +27 -14
- {multimark-0.1.3 → multimark-0.3.2}/.github/workflows/docs.yml +1 -1
- multimark-0.3.2/.github/workflows/pyodide.yml +26 -0
- multimark-0.3.2/.github/workflows/test-build.yml +35 -0
- multimark-0.3.2/.github/workflows/test-sdist.yml +29 -0
- multimark-0.3.2/CITATION.cff +22 -0
- {multimark-0.1.3 → multimark-0.3.2}/Makefile +26 -0
- {multimark-0.1.3/src/multimark.egg-info → multimark-0.3.2}/PKG-INFO +42 -21
- {multimark-0.1.3 → multimark-0.3.2}/README.md +35 -15
- multimark-0.3.2/ROADMAP.md +53 -0
- multimark-0.3.2/WHEELS.md +60 -0
- multimark-0.3.2/_freeze/reference/Options/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/reference/cmark_version/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/reference/markdown_to_commonmark/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/reference/markdown_to_html/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/reference/markdown_to_latex/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/reference/markdown_to_man/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/reference/markdown_to_xml/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/site_libs/clipboard/clipboard.min.js +7 -0
- multimark-0.3.2/_freeze/user-guide/gfm-extensions/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/user-guide/installation/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/user-guide/introduction/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/user-guide/options-and-flags/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/user-guide/output-formats/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/user-guide/parsing-and-ast/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/user-guide/performance/execute-results/html.json +16 -0
- multimark-0.3.2/_freeze/user-guide/quick-start/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/user-guide/recipes/execute-results/html.json +12 -0
- multimark-0.3.2/_freeze/user-guide/security/execute-results/html.json +12 -0
- multimark-0.3.2/assets/logo.png +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/great-docs.yml +17 -5
- multimark-0.3.2/multimark/_binding.c +3660 -0
- multimark-0.3.2/multimark/_binding.o +0 -0
- multimark-0.3.2/pyproject.toml +79 -0
- {multimark-0.1.3 → multimark-0.3.2}/setup.py +1 -0
- multimark-0.3.2/skills/multimark/SKILL.md +156 -0
- {multimark-0.1.3 → multimark-0.3.2}/src/multimark/__init__.py +8 -5
- {multimark-0.1.3 → multimark-0.3.2}/src/multimark/_build_cmark.py +0 -1
- multimark-0.3.2/src/multimark/_cli.py +93 -0
- {multimark-0.1.3 → multimark-0.3.2}/src/multimark/_cmark.py +20 -10
- multimark-0.3.2/src/multimark/_node.py +623 -0
- multimark-0.3.2/src/multimark/_parser.py +280 -0
- multimark-0.3.2/src/multimark/cmark.cffi.h +152 -0
- {multimark-0.1.3 → multimark-0.3.2/src/multimark.egg-info}/PKG-INFO +42 -21
- {multimark-0.1.3 → multimark-0.3.2}/src/multimark.egg-info/SOURCES.txt +77 -3
- multimark-0.3.2/src/multimark.egg-info/entry_points.txt +2 -0
- {multimark-0.1.3 → multimark-0.3.2}/src/multimark.egg-info/requires.txt +1 -0
- multimark-0.3.2/src/multimark.egg-info/scm_file_list.json +199 -0
- multimark-0.3.2/src/multimark.egg-info/scm_version.json +8 -0
- {multimark-0.1.3 → multimark-0.3.2}/tests/spec_parser.py +0 -13
- multimark-0.3.2/tests/test_ast.py +629 -0
- multimark-0.3.2/tests/test_cli.py +175 -0
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_errors.py +0 -5
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_extensions.py +0 -1
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_html.py +71 -1
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_latex.py +5 -1
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_man.py +0 -1
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_package.py +0 -1
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_param_combos.py +0 -5
- multimark-0.3.2/tests/test_parser.py +274 -0
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_pathological.py +0 -5
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_regressions.py +0 -7
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_spec_html.py +0 -5
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_spec_renderers.py +0 -11
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_threads.py +0 -5
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_xml.py +12 -1
- multimark-0.3.2/third_party/cmark-gfm/extensions/autolink.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/extensions/core-extensions.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/extensions/ext_scanners.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/extensions/strikethrough.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/extensions/table.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/extensions/tagfilter.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/extensions/tasklist.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/arena.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/blocks.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/buffer.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/cmark.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/cmark_ctype.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/commonmark.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/footnotes.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/houdini_href_e.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/houdini_html_e.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/houdini_html_u.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/html.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/inlines.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/iterator.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/latex.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/linked_list.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/man.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/map.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/node.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/plaintext.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/plugin.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/references.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/registry.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/render.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/scanners.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/syntax_extension.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/utf8.o +0 -0
- multimark-0.3.2/third_party/cmark-gfm/src/xml.o +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/user_guide/01-installation.qmd +1 -1
- multimark-0.3.2/user_guide/06-cli.qmd +163 -0
- multimark-0.3.2/user_guide/09-performance.qmd +162 -0
- multimark-0.3.2/user_guide/10-parsing-and-ast.qmd +193 -0
- multimark-0.1.3/pyproject.toml +0 -44
- multimark-0.1.3/src/multimark/cmark.cffi.h +0 -54
- multimark-0.1.3/user_guide/08-performance.qmd +0 -109
- {multimark-0.1.3 → multimark-0.3.2}/.github/CODE_OF_CONDUCT.md +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/.gitignore +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/LICENSE +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/assets/logo-dark.png +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/assets/logo-light.png +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/index.qmd +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/setup.cfg +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/src/multimark.egg-info/dependency_links.txt +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/src/multimark.egg-info/top_level.txt +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/tests/conftest.py +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/tests/fixtures/extensions.txt +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/tests/fixtures/regression.txt +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/tests/fixtures/smart_punct.txt +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/tests/fixtures/spec.txt +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/tests/test_commonmark.py +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/CMakeLists.txt +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/autolink.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/autolink.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/cmark-gfm-core-extensions.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/core-extensions.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/ext_scanners.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/ext_scanners.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/ext_scanners.re +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/strikethrough.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/strikethrough.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/table.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/table.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/tagfilter.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/tagfilter.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/tasklist.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/extensions/tasklist.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/CMakeLists.txt +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/arena.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/blocks.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/buffer.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/buffer.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/case_fold_switch.inc +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/chunk.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark-gfm-extension_api.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark-gfm.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark-gfm_export.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark-gfm_version.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark-gfm_version.h.in +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark_ctype.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark_ctype.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/commonmark.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/config.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/config.h.in +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/entities.inc +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/footnotes.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/footnotes.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/houdini.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/houdini_href_e.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/houdini_html_e.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/houdini_html_u.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/html.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/html.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/inlines.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/inlines.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/iterator.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/iterator.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/latex.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/libcmark-gfm.pc.in +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/linked_list.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/main.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/man.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/map.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/map.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/node.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/node.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/parser.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/plaintext.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/plugin.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/plugin.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/references.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/references.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/registry.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/registry.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/render.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/render.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/scanners.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/scanners.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/scanners.re +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/syntax_extension.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/syntax_extension.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/utf8.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/utf8.h +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/third_party/cmark-gfm/src/xml.c +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/user_guide/00-introduction.qmd +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/user_guide/02-quick-start.qmd +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/user_guide/03-gfm-extensions.qmd +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/user_guide/04-output-formats.qmd +0 -0
- {multimark-0.1.3 → multimark-0.3.2}/user_guide/05-options-and-flags.qmd +0 -0
- /multimark-0.1.3/user_guide/06-security.qmd → /multimark-0.3.2/user_guide/07-security.qmd +0 -0
- /multimark-0.1.3/user_guide/07-recipes.qmd → /multimark-0.3.2/user_guide/08-recipes.qmd +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Contributing to multimark
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to multimark! We welcome contributions from the community.
|
|
4
|
+
|
|
5
|
+
## How to Contribute
|
|
6
|
+
|
|
7
|
+
### Reporting Issues
|
|
8
|
+
|
|
9
|
+
If you find a bug or have a suggestion for improvement:
|
|
10
|
+
|
|
11
|
+
1. Check if the issue already exists in the [issue tracker](https://github.com/posit-dev/multimark/issues)
|
|
12
|
+
2. If not, create a new issue with a clear description
|
|
13
|
+
3. Include steps to reproduce (for bugs) or use cases (for features)
|
|
14
|
+
|
|
15
|
+
### Submitting Pull Requests
|
|
16
|
+
|
|
17
|
+
1. Fork the repository
|
|
18
|
+
2. Create a new branch for your changes: `git checkout -b feature/your-feature-name`
|
|
19
|
+
3. Make your changes and commit them with clear, descriptive messages
|
|
20
|
+
4. Add tests for new functionality
|
|
21
|
+
5. Ensure all tests pass: `pytest`
|
|
22
|
+
6. Push to your fork and submit a pull request
|
|
23
|
+
|
|
24
|
+
### Development Setup
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Clone your fork
|
|
28
|
+
git clone https://github.com/YOUR-USERNAME/multimark.git
|
|
29
|
+
cd multimark
|
|
30
|
+
|
|
31
|
+
# Create a virtual environment
|
|
32
|
+
python -m venv .venv
|
|
33
|
+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
34
|
+
|
|
35
|
+
# Install in development mode with test dependencies
|
|
36
|
+
pip install -e .
|
|
37
|
+
pip install pytest
|
|
38
|
+
|
|
39
|
+
# Run tests
|
|
40
|
+
pytest tests/ -v
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Note: Building from source requires a C compiler (for the cmark-gfm CFFI bindings). On most systems this is already available, but on Windows you may need the Visual Studio Build Tools.
|
|
44
|
+
|
|
45
|
+
### Code Style
|
|
46
|
+
|
|
47
|
+
- Follow PEP 8 guidelines
|
|
48
|
+
- Use meaningful variable and function names
|
|
49
|
+
- Add NumPy-style docstrings to public functions and classes
|
|
50
|
+
- Keep functions focused and concise
|
|
51
|
+
|
|
52
|
+
### Running the Documentation Site
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install great-docs
|
|
56
|
+
great-docs build
|
|
57
|
+
great-docs preview
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Testing Release Builds
|
|
61
|
+
|
|
62
|
+
Before cutting a release, you can dry-run each part of the build pipeline using manually triggered workflows. These mirror the release CI but don't publish anything.
|
|
63
|
+
|
|
64
|
+
From the GitHub Actions tab (or via `gh workflow run`):
|
|
65
|
+
|
|
66
|
+
- **Test Wheel Build** (`test-build.yml`): builds native abi3 wheels on Linux, macOS, and Windows
|
|
67
|
+
- **Test Pyodide Build** (`pyodide.yml`): builds the emscripten/WASM wheel for Pyodide
|
|
68
|
+
- **Test Sdist Build** (`test-sdist.yml`): builds the source distribution
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Run all three in parallel
|
|
72
|
+
gh workflow run test-build.yml
|
|
73
|
+
gh workflow run pyodide.yml
|
|
74
|
+
gh workflow run test-sdist.yml
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
You can also build the Pyodide wheel locally (requires Linux or macOS):
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
make dist-pyodide
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Questions?
|
|
84
|
+
|
|
85
|
+
Feel free to open an issue for questions or discussions about contributing.
|
|
@@ -7,8 +7,8 @@ labels: "Type: ☹︎ Bug"
|
|
|
7
7
|
|
|
8
8
|
## Prework
|
|
9
9
|
|
|
10
|
-
- [ ] Read and agree to the [code of conduct](https://www.contributor-covenant.org/version/3/0/) and [contributing guidelines](https://github.com/
|
|
11
|
-
- [ ] If there is [already a relevant issue](https://github.com/
|
|
10
|
+
- [ ] Read and agree to the [code of conduct](https://www.contributor-covenant.org/version/3/0/) and [contributing guidelines](https://github.com/posit-dev/multimark/blob/main/.github/CONTRIBUTING.md).
|
|
11
|
+
- [ ] If there is [already a relevant issue](https://github.com/posit-dev/multimark/issues), whether open or closed, comment on the existing thread instead of posting a new issue.
|
|
12
12
|
|
|
13
13
|
## Description
|
|
14
14
|
|
|
@@ -7,8 +7,8 @@ labels: "Type: ★ Enhancement"
|
|
|
7
7
|
|
|
8
8
|
## Prework
|
|
9
9
|
|
|
10
|
-
- [ ] Read and abide by the multimark [code of conduct](https://www.contributor-covenant.org/version/3/0/) and [contributing guidelines](https://github.com/
|
|
11
|
-
- [ ] Search for duplicates among the [existing issues](https://github.com/
|
|
10
|
+
- [ ] Read and abide by the multimark [code of conduct](https://www.contributor-covenant.org/version/3/0/) and [contributing guidelines](https://github.com/posit-dev/multimark/blob/main/.github/CONTRIBUTING.md).
|
|
11
|
+
- [ ] Search for duplicates among the [existing issues](https://github.com/posit-dev/multimark/issues) (both open and closed).
|
|
12
12
|
|
|
13
13
|
## Proposal
|
|
14
14
|
|
|
@@ -7,8 +7,8 @@ labels: "Type: ⁇ Question"
|
|
|
7
7
|
|
|
8
8
|
## Prework
|
|
9
9
|
|
|
10
|
-
- [ ] Read and agree to the [code of conduct](https://www.contributor-covenant.org/version/3/0/) and [contributing guidelines](https://github.com/
|
|
11
|
-
- [ ] If there is [already a relevant issue](https://github.com/
|
|
10
|
+
- [ ] Read and agree to the [code of conduct](https://www.contributor-covenant.org/version/3/0/) and [contributing guidelines](https://github.com/posit-dev/multimark/blob/main/.github/CONTRIBUTING.md).
|
|
11
|
+
- [ ] If there is [already a relevant issue](https://github.com/posit-dev/multimark/issues), whether open or closed, comment on the existing thread instead of posting a new issue.
|
|
12
12
|
|
|
13
13
|
## Question
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ jobs:
|
|
|
19
19
|
fail-fast: false
|
|
20
20
|
matrix:
|
|
21
21
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
22
|
-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
22
|
+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
23
23
|
|
|
24
24
|
steps:
|
|
25
25
|
- uses: actions/checkout@v6
|
|
@@ -48,33 +48,45 @@ jobs:
|
|
|
48
48
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
49
49
|
|
|
50
50
|
steps:
|
|
51
|
-
- uses: actions/checkout@
|
|
51
|
+
- uses: actions/checkout@v6
|
|
52
52
|
with:
|
|
53
53
|
fetch-depth: 0
|
|
54
54
|
|
|
55
|
-
- uses: actions/setup-python@
|
|
55
|
+
- uses: actions/setup-python@v6
|
|
56
56
|
with:
|
|
57
57
|
python-version: "3.12"
|
|
58
58
|
|
|
59
59
|
- name: Install cibuildwheel
|
|
60
|
-
run: pip install cibuildwheel==2.
|
|
60
|
+
run: pip install cibuildwheel==2.23.4
|
|
61
61
|
|
|
62
62
|
- name: Build wheels
|
|
63
63
|
run: python -m cibuildwheel --output-dir wheelhouse
|
|
64
|
-
env:
|
|
65
|
-
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*"
|
|
66
|
-
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_i686"
|
|
67
|
-
CIBW_ARCHS_MACOS: "x86_64 arm64"
|
|
68
|
-
CIBW_ARCHS_LINUX: "x86_64"
|
|
69
|
-
CIBW_BEFORE_BUILD: "git config --global --add safe.directory /project"
|
|
70
|
-
CIBW_TEST_COMMAND: "pytest {project}/tests -x"
|
|
71
|
-
CIBW_TEST_REQUIRES: "pytest"
|
|
72
64
|
|
|
73
65
|
- uses: actions/upload-artifact@v4
|
|
74
66
|
with:
|
|
75
67
|
name: wheels-${{ matrix.os }}
|
|
76
68
|
path: ./wheelhouse/*.whl
|
|
77
69
|
|
|
70
|
+
build_pyodide:
|
|
71
|
+
name: Build Pyodide wheel
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
needs: test
|
|
74
|
+
if: github.event_name == 'release'
|
|
75
|
+
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@v6
|
|
78
|
+
with:
|
|
79
|
+
fetch-depth: 0
|
|
80
|
+
|
|
81
|
+
- uses: pypa/cibuildwheel@v3.4.0
|
|
82
|
+
env:
|
|
83
|
+
CIBW_PLATFORM: pyodide
|
|
84
|
+
|
|
85
|
+
- uses: actions/upload-artifact@v4
|
|
86
|
+
with:
|
|
87
|
+
name: pyodide-wheel
|
|
88
|
+
path: wheelhouse/*.whl
|
|
89
|
+
|
|
78
90
|
build_sdist:
|
|
79
91
|
name: Build source distribution
|
|
80
92
|
runs-on: ubuntu-latest
|
|
@@ -82,11 +94,11 @@ jobs:
|
|
|
82
94
|
if: github.event_name == 'release'
|
|
83
95
|
|
|
84
96
|
steps:
|
|
85
|
-
- uses: actions/checkout@
|
|
97
|
+
- uses: actions/checkout@v6
|
|
86
98
|
with:
|
|
87
99
|
fetch-depth: 0
|
|
88
100
|
|
|
89
|
-
- uses: actions/setup-python@
|
|
101
|
+
- uses: actions/setup-python@v6
|
|
90
102
|
with:
|
|
91
103
|
python-version: "3.12"
|
|
92
104
|
|
|
@@ -119,3 +131,4 @@ jobs:
|
|
|
119
131
|
with:
|
|
120
132
|
user: __token__
|
|
121
133
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
134
|
+
skip-existing: true
|
|
@@ -23,7 +23,7 @@ jobs:
|
|
|
23
23
|
run: |
|
|
24
24
|
python -m pip install --upgrade pip
|
|
25
25
|
python -m pip install -e .
|
|
26
|
-
python -m pip install great-docs
|
|
26
|
+
python -m pip install git+https://github.com/posit-dev/great-docs.git@main
|
|
27
27
|
|
|
28
28
|
- name: Set up Quarto
|
|
29
29
|
uses: quarto-dev/quarto-actions/setup@v2
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Test Pyodide Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
env:
|
|
7
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build_pyodide:
|
|
11
|
+
name: Build Pyodide wheel
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v6
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- uses: pypa/cibuildwheel@v3.4.0
|
|
20
|
+
env:
|
|
21
|
+
CIBW_PLATFORM: pyodide
|
|
22
|
+
|
|
23
|
+
- uses: actions/upload-artifact@v4
|
|
24
|
+
with:
|
|
25
|
+
name: wheels-pyodide
|
|
26
|
+
path: wheelhouse/*.whl
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Test Wheel Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
env:
|
|
7
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build_wheels:
|
|
11
|
+
name: Build wheels on ${{ matrix.os }}
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
|
|
22
|
+
- uses: actions/setup-python@v6
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
|
|
26
|
+
- name: Install cibuildwheel
|
|
27
|
+
run: pip install cibuildwheel==2.23.4
|
|
28
|
+
|
|
29
|
+
- name: Build wheels
|
|
30
|
+
run: python -m cibuildwheel --output-dir wheelhouse
|
|
31
|
+
|
|
32
|
+
- uses: actions/upload-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: wheels-${{ matrix.os }}
|
|
35
|
+
path: ./wheelhouse/*.whl
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Test Sdist Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
env:
|
|
7
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build_sdist:
|
|
11
|
+
name: Build source distribution
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v6
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- uses: actions/setup-python@v6
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
|
|
23
|
+
- name: Build sdist
|
|
24
|
+
run: pip install build && python -m build --sdist
|
|
25
|
+
|
|
26
|
+
- uses: actions/upload-artifact@v4
|
|
27
|
+
with:
|
|
28
|
+
name: sdist
|
|
29
|
+
path: dist/*.tar.gz
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: 'If you wish to cite the "nokap" package use:'
|
|
3
|
+
type: software
|
|
4
|
+
license: MIT
|
|
5
|
+
title: "multimark provides Python bindings to cmark and allows for CommonMark parsing and rendering (HTML, LaTeX, man, XML)"
|
|
6
|
+
version: "0.2.0"
|
|
7
|
+
abstract:
|
|
8
|
+
multimark provides Python bindings to cmark, enabling CommonMark parsing and rendering to various formats
|
|
9
|
+
including HTML, LaTeX, man, and XML. A CLI is also provided for command-line usage. The package is designed to be fast,
|
|
10
|
+
efficient, and easy to use, making it a great choice for developers looking to work with CommonMark in Python.
|
|
11
|
+
authors:
|
|
12
|
+
- family-names: Iannone
|
|
13
|
+
given-names: Rich
|
|
14
|
+
email: riannone@me.com
|
|
15
|
+
orcid: https://orcid.org/0000-0003-3925-190X
|
|
16
|
+
repository-code: https://github.com/posit-dev/multimark
|
|
17
|
+
url: https://posit-dev.github.io/multimark
|
|
18
|
+
contact:
|
|
19
|
+
- family-names: Iannone
|
|
20
|
+
given-names: Rich
|
|
21
|
+
email: riannone@me.com
|
|
22
|
+
orcid: https://orcid.org/0000-0003-3925-190X
|
|
@@ -29,3 +29,29 @@ clean-test: ## remove test and coverage artifacts
|
|
|
29
29
|
dist: clean ## builds source and wheel package
|
|
30
30
|
python3 -m build
|
|
31
31
|
ls -l dist
|
|
32
|
+
|
|
33
|
+
.PHONY: dist-wheel
|
|
34
|
+
dist-wheel: clean ## builds native abi3 wheel using cibuildwheel
|
|
35
|
+
pip install cibuildwheel==2.23.4
|
|
36
|
+
python -m cibuildwheel --output-dir dist
|
|
37
|
+
ls -l dist
|
|
38
|
+
|
|
39
|
+
.PHONY: dist-pyodide
|
|
40
|
+
dist-pyodide: clean ## builds Pyodide/emscripten wheel (requires Linux or macOS)
|
|
41
|
+
pip install pyodide-build
|
|
42
|
+
pyodide build --outdir dist
|
|
43
|
+
ls -l dist
|
|
44
|
+
|
|
45
|
+
.PHONY: dist-sdist
|
|
46
|
+
dist-sdist: clean ## builds source distribution only
|
|
47
|
+
pip install build
|
|
48
|
+
python3 -m build --sdist
|
|
49
|
+
ls -l dist
|
|
50
|
+
|
|
51
|
+
.PHONY: dist-all
|
|
52
|
+
dist-all: clean ## builds native wheel, Pyodide wheel, and sdist
|
|
53
|
+
pip install cibuildwheel==2.23.4 pyodide-build build
|
|
54
|
+
python -m cibuildwheel --output-dir dist
|
|
55
|
+
pyodide build --outdir dist
|
|
56
|
+
python3 -m build --sdist --outdir dist
|
|
57
|
+
ls -l dist
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: multimark
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Python bindings to cmark
|
|
3
|
+
Version: 0.3.2
|
|
4
|
+
Summary: Python bindings to cmark: CommonMark parsing and rendering (HTML, LaTeX, man, XML)
|
|
5
5
|
Author: Rich Iannone
|
|
6
|
-
License: MIT AND BSD-2-Clause
|
|
7
|
-
Project-URL: Homepage, https://github.com/
|
|
8
|
-
Project-URL: Issues, https://github.com/
|
|
6
|
+
License-Expression: MIT AND BSD-2-Clause
|
|
7
|
+
Project-URL: Homepage, https://github.com/posit-dev/multimark
|
|
8
|
+
Project-URL: Issues, https://github.com/posit-dev/multimark/issues
|
|
9
9
|
Keywords: markdown,commonmark,cmark-gfm,html,latex,gfm
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
13
12
|
Classifier: Operating System :: OS Independent
|
|
14
13
|
Classifier: Programming Language :: C
|
|
15
14
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -18,23 +17,27 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
21
|
Classifier: Topic :: Text Processing :: Markup :: Markdown
|
|
22
22
|
Requires-Python: >=3.9
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
|
25
25
|
Requires-Dist: cffi>=1.15
|
|
26
|
+
Requires-Dist: click>=8.0
|
|
26
27
|
Dynamic: license-file
|
|
27
28
|
|
|
29
|
+
<p align="center">
|
|
30
|
+
<img src="https://posit-dev.github.io/multimark/assets/logo.png" alt="multimark" width="350">
|
|
31
|
+
</p>
|
|
32
|
+
<p align="center">
|
|
28
33
|
<a href="https://pypi.org/project/multimark/"><img src="https://img.shields.io/pypi/v/multimark?logo=python&logoColor=white&color=orange" alt="PyPI"></a>
|
|
29
34
|
<a href="https://pypi.org/project/multimark/"><img src="https://img.shields.io/pypi/pyversions/multimark.svg" alt="Python versions"></a>
|
|
30
35
|
<a href="https://pypistats.org/packages/multimark"><img src="https://img.shields.io/pypi/dm/multimark" alt="Downloads"></a>
|
|
31
36
|
<a href="https://choosealicense.com/licenses/mit/"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License"></a>
|
|
32
|
-
<a href="https://github.com/
|
|
37
|
+
<a href="https://github.com/posit-dev/multimark/actions/workflows/ci.yml"><img src="https://github.com/posit-dev/multimark/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
|
|
33
38
|
</p>
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Python bindings to [cmark-gfm](https://github.com/github/cmark-gfm), the C reference implementation of [CommonMark](https://commonmark.org/) with GitHub Flavored Markdown extensions.
|
|
40
|
+
The **multimark** package has Python bindings to [cmark-gfm](https://github.com/github/cmark-gfm), the C reference implementation of [CommonMark](https://commonmark.org/) with GitHub Flavored Markdown extensions.
|
|
38
41
|
|
|
39
42
|
Renders Markdown to **HTML**, **LaTeX**, **groff man**, **XML**, and **normalized CommonMark**: all from a single, lightweight package.
|
|
40
43
|
|
|
@@ -129,20 +132,38 @@ Available extensions: `table`, `strikethrough`, `autolink`, `tagfilter`, `taskli
|
|
|
129
132
|
|
|
130
133
|
Every renderer accepts:
|
|
131
134
|
|
|
132
|
-
- **`text
|
|
133
|
-
- **`options
|
|
134
|
-
- **`extensions
|
|
135
|
-
- **`smart
|
|
136
|
-
- **`hardbreaks
|
|
137
|
-
- **`unsafe
|
|
138
|
-
- **`normalize
|
|
139
|
-
- **`footnotes
|
|
135
|
+
- **`text`**: Markdown string
|
|
136
|
+
- **`options`**: raw bitmask (default `0`)
|
|
137
|
+
- **`extensions`**: list of GFM extension names (default `()`)
|
|
138
|
+
- **`smart`**: smart punctuation
|
|
139
|
+
- **`hardbreaks`**: render soft breaks as `<br>`
|
|
140
|
+
- **`unsafe`**: allow raw HTML
|
|
141
|
+
- **`normalize`**: consolidate adjacent text nodes
|
|
142
|
+
- **`footnotes`**: enable footnote syntax
|
|
140
143
|
|
|
141
144
|
Additional parameters:
|
|
142
145
|
|
|
143
|
-
- **`sourcepos
|
|
144
|
-
- **`width
|
|
146
|
+
- **`sourcepos`**: Source position attributes (HTML and XML only)
|
|
147
|
+
- **`width`**: Line wrap column (LaTeX, man, and commonmark only; `0` = no wrap)
|
|
148
|
+
|
|
149
|
+
## Why multimark?
|
|
150
|
+
|
|
151
|
+
Several Python packages wrap cmark or provide CommonMark parsing. Here's how they compare:
|
|
152
|
+
|
|
153
|
+
| | **multimark** | **[cmarkgfm](https://github.com/theacodes/cmarkgfm)** | **[commonmark.py](https://github.com/readthedocs/commonmark.py)** |
|
|
154
|
+
|---|---|---|---|
|
|
155
|
+
| Engine | cmark-gfm (C, vendored) | cmark-gfm (C, vendored) | Pure Python |
|
|
156
|
+
| Output formats | HTML, LaTeX, man, XML, CommonMark | HTML only | HTML only |
|
|
157
|
+
| GFM extensions | ✓ | ✓ | ✗ |
|
|
158
|
+
| Safe by default | ✓ | ✓ | ✗ |
|
|
159
|
+
| Convenience kwargs | `smart=True`, `unsafe=True`, etc. | Raw bitmask only | N/A |
|
|
160
|
+
| Performance | **Fastest** (14% faster than cmarkgfm) | Fast | ~31× slower |
|
|
161
|
+
| Maintained | Active (2026) | Active (2025) | Unmaintained (2019) |
|
|
162
|
+
|
|
163
|
+
multimark uses the same battle-tested C library as `cmarkgfm` but exposes all five of cmark's output formats (not just HTML). The API is designed around keyword arguments rather than opaque bitmasks, and unsafe content is blocked by default so the safe choice requires no extra configuration.
|
|
164
|
+
|
|
165
|
+
Thanks to extension pointer caching and reduced Python-side overhead, multimark is the **fastest Python Markdown-to-HTML library**. Take a look at the [benchmarks](https://posit-dev.github.io/multimark/user-guide/performance.html) for more detail on this.
|
|
145
166
|
|
|
146
167
|
## License
|
|
147
168
|
|
|
148
|
-
MIT
|
|
169
|
+
MIT and BSD-2-Clause (`cmark-gfm`).
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://posit-dev.github.io/multimark/assets/logo.png" alt="multimark" width="350">
|
|
3
|
+
</p>
|
|
4
|
+
<p align="center">
|
|
1
5
|
<a href="https://pypi.org/project/multimark/"><img src="https://img.shields.io/pypi/v/multimark?logo=python&logoColor=white&color=orange" alt="PyPI"></a>
|
|
2
6
|
<a href="https://pypi.org/project/multimark/"><img src="https://img.shields.io/pypi/pyversions/multimark.svg" alt="Python versions"></a>
|
|
3
7
|
<a href="https://pypistats.org/packages/multimark"><img src="https://img.shields.io/pypi/dm/multimark" alt="Downloads"></a>
|
|
4
8
|
<a href="https://choosealicense.com/licenses/mit/"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License"></a>
|
|
5
|
-
<a href="https://github.com/
|
|
9
|
+
<a href="https://github.com/posit-dev/multimark/actions/workflows/ci.yml"><img src="https://github.com/posit-dev/multimark/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
|
|
6
10
|
</p>
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Python bindings to [cmark-gfm](https://github.com/github/cmark-gfm), the C reference implementation of [CommonMark](https://commonmark.org/) with GitHub Flavored Markdown extensions.
|
|
12
|
+
The **multimark** package has Python bindings to [cmark-gfm](https://github.com/github/cmark-gfm), the C reference implementation of [CommonMark](https://commonmark.org/) with GitHub Flavored Markdown extensions.
|
|
11
13
|
|
|
12
14
|
Renders Markdown to **HTML**, **LaTeX**, **groff man**, **XML**, and **normalized CommonMark**: all from a single, lightweight package.
|
|
13
15
|
|
|
@@ -102,20 +104,38 @@ Available extensions: `table`, `strikethrough`, `autolink`, `tagfilter`, `taskli
|
|
|
102
104
|
|
|
103
105
|
Every renderer accepts:
|
|
104
106
|
|
|
105
|
-
- **`text
|
|
106
|
-
- **`options
|
|
107
|
-
- **`extensions
|
|
108
|
-
- **`smart
|
|
109
|
-
- **`hardbreaks
|
|
110
|
-
- **`unsafe
|
|
111
|
-
- **`normalize
|
|
112
|
-
- **`footnotes
|
|
107
|
+
- **`text`**: Markdown string
|
|
108
|
+
- **`options`**: raw bitmask (default `0`)
|
|
109
|
+
- **`extensions`**: list of GFM extension names (default `()`)
|
|
110
|
+
- **`smart`**: smart punctuation
|
|
111
|
+
- **`hardbreaks`**: render soft breaks as `<br>`
|
|
112
|
+
- **`unsafe`**: allow raw HTML
|
|
113
|
+
- **`normalize`**: consolidate adjacent text nodes
|
|
114
|
+
- **`footnotes`**: enable footnote syntax
|
|
113
115
|
|
|
114
116
|
Additional parameters:
|
|
115
117
|
|
|
116
|
-
- **`sourcepos
|
|
117
|
-
- **`width
|
|
118
|
+
- **`sourcepos`**: Source position attributes (HTML and XML only)
|
|
119
|
+
- **`width`**: Line wrap column (LaTeX, man, and commonmark only; `0` = no wrap)
|
|
120
|
+
|
|
121
|
+
## Why multimark?
|
|
122
|
+
|
|
123
|
+
Several Python packages wrap cmark or provide CommonMark parsing. Here's how they compare:
|
|
124
|
+
|
|
125
|
+
| | **multimark** | **[cmarkgfm](https://github.com/theacodes/cmarkgfm)** | **[commonmark.py](https://github.com/readthedocs/commonmark.py)** |
|
|
126
|
+
|---|---|---|---|
|
|
127
|
+
| Engine | cmark-gfm (C, vendored) | cmark-gfm (C, vendored) | Pure Python |
|
|
128
|
+
| Output formats | HTML, LaTeX, man, XML, CommonMark | HTML only | HTML only |
|
|
129
|
+
| GFM extensions | ✓ | ✓ | ✗ |
|
|
130
|
+
| Safe by default | ✓ | ✓ | ✗ |
|
|
131
|
+
| Convenience kwargs | `smart=True`, `unsafe=True`, etc. | Raw bitmask only | N/A |
|
|
132
|
+
| Performance | **Fastest** (14% faster than cmarkgfm) | Fast | ~31× slower |
|
|
133
|
+
| Maintained | Active (2026) | Active (2025) | Unmaintained (2019) |
|
|
134
|
+
|
|
135
|
+
multimark uses the same battle-tested C library as `cmarkgfm` but exposes all five of cmark's output formats (not just HTML). The API is designed around keyword arguments rather than opaque bitmasks, and unsafe content is blocked by default so the safe choice requires no extra configuration.
|
|
136
|
+
|
|
137
|
+
Thanks to extension pointer caching and reduced Python-side overhead, multimark is the **fastest Python Markdown-to-HTML library**. Take a look at the [benchmarks](https://posit-dev.github.io/multimark/user-guide/performance.html) for more detail on this.
|
|
118
138
|
|
|
119
139
|
## License
|
|
120
140
|
|
|
121
|
-
MIT
|
|
141
|
+
MIT and BSD-2-Clause (`cmark-gfm`).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
This document outlines longer-term ideas for multimark: features that would expand its
|
|
4
|
+
capabilities beyond the current render-to-string API.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Planned — Near Term
|
|
9
|
+
|
|
10
|
+
Enhancements that build directly on existing infrastructure.
|
|
11
|
+
|
|
12
|
+
### Type Stubs / `py.typed` Marker
|
|
13
|
+
|
|
14
|
+
Add a `py.typed` marker and inline type annotations for better IDE support and static
|
|
15
|
+
analysis.
|
|
16
|
+
|
|
17
|
+
- PEP 561 compliant `py.typed` marker file in the package
|
|
18
|
+
- Full type annotations on all public functions and the `Options` enum
|
|
19
|
+
- Improved autocomplete, hover docs, and type checking in editors
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Planned — Medium Term
|
|
24
|
+
|
|
25
|
+
Features that expand the scope of what multimark can produce.
|
|
26
|
+
|
|
27
|
+
### Streaming / Incremental API
|
|
28
|
+
|
|
29
|
+
Expose the cmark parser object for large documents, allowing feed-based parsing without
|
|
30
|
+
buffering the entire input in memory.
|
|
31
|
+
|
|
32
|
+
- `Parser` class wrapping `cmark_parser_new` / `cmark_parser_feed` / `cmark_parser_finish`
|
|
33
|
+
- Extensions attachable at parser creation time
|
|
34
|
+
- Render from the finished AST node with any renderer
|
|
35
|
+
- Useful for processing very large Markdown files or streaming input
|
|
36
|
+
|
|
37
|
+
### AST Access
|
|
38
|
+
|
|
39
|
+
Let users walk the parsed tree from Python (not just render to a string).
|
|
40
|
+
|
|
41
|
+
- `parse()` function returning a `Node` wrapper around the cmark AST
|
|
42
|
+
- Tree traversal: `node.children`, `node.parent`, `node.next`, `node.prev`
|
|
43
|
+
- Node type introspection: `node.type`, `node.literal`, `node.url`, `node.title`
|
|
44
|
+
- Mutation support: insert, remove, and replace nodes before rendering
|
|
45
|
+
- Enables custom transformations, inspections, and selective rendering
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Feedback & Contributions
|
|
50
|
+
|
|
51
|
+
Have ideas for features not listed here? [Open an issue](https://github.com/posit-dev/multimark/issues) with the `enhancement` label. Contributions to any planned item are welcome so check existing issues first to avoid duplication.
|
|
52
|
+
|
|
53
|
+
_This roadmap is a living document. It is updated as features ship and new priorities emerge._
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Wheel Builds
|
|
2
|
+
|
|
3
|
+
multimark is a compiled Python package (CFFI bindings to vendored cmark-gfm C sources). Pre-built wheels are published to PyPI on each release. This document describes what gets built, for which platforms, and why.
|
|
4
|
+
|
|
5
|
+
## Python Version Support
|
|
6
|
+
|
|
7
|
+
multimark uses the Python stable ABI (abi3) with a floor of **CPython 3.9**. A single wheel per platform covers all Python versions from 3.9 onward, including future releases. The test suite runs on Python 3.9 through 3.14.
|
|
8
|
+
|
|
9
|
+
## Native Wheels
|
|
10
|
+
|
|
11
|
+
Built with cibuildwheel using the `cp39-abi3` tag.
|
|
12
|
+
|
|
13
|
+
| Platform | Architectures | Wheel tag |
|
|
14
|
+
|----------|--------------|-----------|
|
|
15
|
+
| Linux (manylinux) | x86_64 | `cp39-abi3-manylinux_*_x86_64` |
|
|
16
|
+
| macOS | x86_64, arm64 | `cp39-abi3-macosx_*_x86_64`, `cp39-abi3-macosx_*_arm64` |
|
|
17
|
+
| Windows | x86_64 | `cp39-abi3-win_amd64` |
|
|
18
|
+
|
|
19
|
+
Skipped: 32-bit Windows (`win32`), 32-bit Linux (`manylinux_i686`), musl 32-bit (`musllinux_i686`).
|
|
20
|
+
|
|
21
|
+
## Pyodide / WebAssembly Wheels
|
|
22
|
+
|
|
23
|
+
Built with cibuildwheel using `CIBW_PLATFORM=pyodide`. These allow multimark to run in browser-based Python environments (Pyodide, JupyterLite, Shinylive).
|
|
24
|
+
|
|
25
|
+
| Pyodide Version | Python | Emscripten | Wheel tag |
|
|
26
|
+
|----------------|--------|------------|-----------|
|
|
27
|
+
| 0.29.x | 3.13 | 4.0.9 | `cp39-abi3-pyodide_2025_0_wasm32` |
|
|
28
|
+
|
|
29
|
+
Threading and CLI tests are skipped under Pyodide (emscripten does not support pthreads or subprocesses).
|
|
30
|
+
|
|
31
|
+
## Source Distribution
|
|
32
|
+
|
|
33
|
+
An sdist (`multimark-*.tar.gz`) is also published. Building from source requires a C compiler and the vendored cmark-gfm sources (included in the tarball).
|
|
34
|
+
|
|
35
|
+
## Building Locally
|
|
36
|
+
|
|
37
|
+
| Target | Command |
|
|
38
|
+
|--------|---------|
|
|
39
|
+
| Native wheel | `make dist-wheel` |
|
|
40
|
+
| Pyodide wheel | `make dist-pyodide` |
|
|
41
|
+
| Source distribution | `make dist-sdist` |
|
|
42
|
+
| All of the above | `make dist-all` |
|
|
43
|
+
|
|
44
|
+
## Testing Builds Before a Release
|
|
45
|
+
|
|
46
|
+
Three manually triggered GitHub Actions workflows mirror the release pipeline without publishing:
|
|
47
|
+
|
|
48
|
+
- **Test Wheel Build** (`test-build.yml`): native abi3 wheels on all platforms
|
|
49
|
+
- **Test Pyodide Build** (`pyodide.yml`): emscripten/WASM wheels
|
|
50
|
+
- **Test Sdist Build** (`test-sdist.yml`): source distribution
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
gh workflow run test-build.yml
|
|
54
|
+
gh workflow run pyodide.yml
|
|
55
|
+
gh workflow run test-sdist.yml
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
All cibuildwheel settings live in `pyproject.toml` under `[tool.cibuildwheel]`. The release CI workflow (`ci.yml`) and local Makefile targets read from the same configuration.
|