multimark 0.2.0__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.2.0 → multimark-0.3.2}/.github/CONTRIBUTING.md +23 -0
- {multimark-0.2.0 → multimark-0.3.2}/.github/workflows/ci.yml +27 -14
- 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.2.0 → multimark-0.3.2}/Makefile +26 -0
- {multimark-0.2.0/src/multimark.egg-info → multimark-0.3.2}/PKG-INFO +3 -3
- 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.2.0 → multimark-0.3.2}/_freeze/site_libs/clipboard/clipboard.min.js +1 -1
- 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/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.2.0 → multimark-0.3.2}/great-docs.yml +12 -0
- multimark-0.3.2/multimark/_binding.c +3660 -0
- multimark-0.3.2/multimark/_binding.o +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/pyproject.toml +22 -2
- {multimark-0.2.0 → multimark-0.3.2}/setup.py +1 -0
- {multimark-0.2.0 → multimark-0.3.2}/skills/multimark/SKILL.md +48 -0
- {multimark-0.2.0 → multimark-0.3.2}/src/multimark/__init__.py +8 -0
- 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.2.0 → multimark-0.3.2/src/multimark.egg-info}/PKG-INFO +3 -3
- {multimark-0.2.0 → multimark-0.3.2}/src/multimark.egg-info/SOURCES.txt +65 -1
- 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.3.2/tests/test_ast.py +629 -0
- multimark-0.3.2/tests/test_parser.py +274 -0
- 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.3.2/user_guide/10-parsing-and-ast.qmd +193 -0
- multimark-0.2.0/src/multimark/cmark.cffi.h +0 -54
- {multimark-0.2.0 → multimark-0.3.2}/.github/CODE_OF_CONDUCT.md +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/.github/ISSUE_TEMPLATE/bug.md +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/.github/ISSUE_TEMPLATE/feature.md +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/.github/ISSUE_TEMPLATE/question.md +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/.github/workflows/docs.yml +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/.gitignore +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/LICENSE +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/README.md +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/ROADMAP.md +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/_freeze/user-guide/performance/execute-results/html.json +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/assets/logo-dark.png +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/assets/logo-light.png +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/assets/logo.png +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/index.qmd +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/setup.cfg +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/src/multimark/_build_cmark.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/src/multimark/_cli.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/src/multimark/_cmark.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/src/multimark.egg-info/dependency_links.txt +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/src/multimark.egg-info/entry_points.txt +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/src/multimark.egg-info/requires.txt +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/src/multimark.egg-info/top_level.txt +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/conftest.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/fixtures/extensions.txt +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/fixtures/regression.txt +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/fixtures/smart_punct.txt +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/fixtures/spec.txt +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/spec_parser.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_cli.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_commonmark.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_errors.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_extensions.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_html.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_latex.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_man.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_package.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_param_combos.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_pathological.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_regressions.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_spec_html.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_spec_renderers.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_threads.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/tests/test_xml.py +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/CMakeLists.txt +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/autolink.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/autolink.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/cmark-gfm-core-extensions.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/core-extensions.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/ext_scanners.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/ext_scanners.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/ext_scanners.re +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/strikethrough.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/strikethrough.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/table.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/table.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/tagfilter.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/tagfilter.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/tasklist.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/extensions/tasklist.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/CMakeLists.txt +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/arena.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/blocks.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/buffer.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/buffer.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/case_fold_switch.inc +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/chunk.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark-gfm-extension_api.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark-gfm.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark-gfm_export.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark-gfm_version.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark-gfm_version.h.in +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark_ctype.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/cmark_ctype.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/commonmark.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/config.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/config.h.in +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/entities.inc +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/footnotes.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/footnotes.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/houdini.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/houdini_href_e.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/houdini_html_e.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/houdini_html_u.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/html.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/html.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/inlines.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/inlines.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/iterator.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/iterator.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/latex.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/libcmark-gfm.pc.in +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/linked_list.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/main.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/man.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/map.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/map.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/node.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/node.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/parser.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/plaintext.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/plugin.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/plugin.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/references.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/references.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/registry.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/registry.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/render.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/render.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/scanners.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/scanners.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/scanners.re +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/syntax_extension.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/syntax_extension.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/utf8.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/utf8.h +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/third_party/cmark-gfm/src/xml.c +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/user_guide/00-introduction.qmd +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/user_guide/01-installation.qmd +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/user_guide/02-quick-start.qmd +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/user_guide/03-gfm-extensions.qmd +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/user_guide/04-output-formats.qmd +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/user_guide/05-options-and-flags.qmd +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/user_guide/06-cli.qmd +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/user_guide/07-security.qmd +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/user_guide/08-recipes.qmd +0 -0
- {multimark-0.2.0 → multimark-0.3.2}/user_guide/09-performance.qmd +0 -0
|
@@ -57,6 +57,29 @@ great-docs build
|
|
|
57
57
|
great-docs preview
|
|
58
58
|
```
|
|
59
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
|
+
|
|
60
83
|
## Questions?
|
|
61
84
|
|
|
62
85
|
Feel free to open an issue for questions or discussions about contributing.
|
|
@@ -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
|
|
@@ -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.2
|
|
3
|
+
Version: 0.3.2
|
|
4
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
|
|
6
|
+
License-Expression: MIT AND BSD-2-Clause
|
|
7
7
|
Project-URL: Homepage, https://github.com/posit-dev/multimark
|
|
8
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,6 +17,7 @@ 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
|
|
@@ -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.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hash": "23b4bbb83cb1fc8c7866d80c35d6bec7",
|
|
3
|
+
"result": {
|
|
4
|
+
"engine": "jupyter",
|
|
5
|
+
"markdown": "---\ntitle: \"[Options]{.doc-object-name .doc-class .doc-label .doc-label-enum}\"\nbody-classes: doc-api-page\npage-navigation: false\nhtml-table-processing: none\n---\n\n::: {.doc-subject}\n\nCommonMark/GFM parsing and rendering options.\n:::\n\n::: {.doc-usage-source}\nUsage\n\n[Source](https://github.com/posit-dev/multimark/blob/main/src/multimark/__init__.py#L23-L80){target=\"_blank\" rel=\"noopener\"}\n:::\n\n::: {.doc-signature .doc-Kind.CLASS}\n```python\nOptions()\n```\n:::\n\n::: {.doc-text}\n\nAn `IntFlag` enumeration of all option flags supported by the cmark-gfm library.\nOptions can be combined using the bitwise OR operator (`|`) and passed to any\nrenderer's `options=` parameter. This provides a composable, lower-level alternative\nto the named boolean keyword arguments available on each renderer function.\n\nMost users will prefer the named keyword arguments (e.g., `smart=True`) for common\noptions. The `Options` bitmask is useful when you need to combine multiple flags\ninto a single reusable value, or when working with GFM-specific flags that do not\nhave dedicated keyword arguments.\n:::\n\n## Examples {.doc-examples}\n\nCombine multiple flags with the `|` operator:\n\n::: {#b5ca47ed .cell execution_count=1}\n``` {.python .cell-code}\nfrom multimark import markdown_to_html, Options\n\nopts = Options.SMART | Options.UNSAFE\nmarkdown_to_html('\"Hello\" -- world', options=opts)\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n'<p>“Hello” – world</p>\\n'\n```\n:::\n:::\n\n\nMix a bitmask with named keyword arguments (they are OR'd together):\n\n::: {#8ca8a90d .cell execution_count=2}\n``` {.python .cell-code}\ntext = \"Here's some *text* to convert\"\nmarkdown_to_html(text, options=Options.SMART, footnotes=True)\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n'<p>Here’s some <em>text</em> to convert</p>\\n'\n```\n:::\n:::\n\n\nUse GFM-specific flags that have no keyword shortcut:\n\n::: {#3ffb444e .cell execution_count=3}\n``` {.python .cell-code}\nmarkdown_to_html(\n \"~~deleted~~\",\n options=Options.STRIKETHROUGH_DOUBLE_TILDE,\n extensions=[\"strikethrough\"],\n)\n```\n\n::: {.cell-output .cell-output-display execution_count=3}\n```\n'<p><del>deleted</del></p>\\n'\n```\n:::\n:::\n\n\n",
|
|
6
|
+
"supporting": [
|
|
7
|
+
"Options_files"
|
|
8
|
+
],
|
|
9
|
+
"filters": [],
|
|
10
|
+
"includes": {}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hash": "72822c07f9164470668ab21e040d798e",
|
|
3
|
+
"result": {
|
|
4
|
+
"engine": "jupyter",
|
|
5
|
+
"markdown": "---\ntitle: \"[cmark_version()]{.doc-object-name .doc-function .doc-label .doc-label-function}\"\nbody-classes: doc-api-page\npage-navigation: false\nhtml-table-processing: none\n---\n\n::: {.doc-subject}\n\nReturn the version string of the vendored cmark-gfm library.\n:::\n\n::: {.doc-usage-source}\nUsage\n\n[Source](https://github.com/posit-dev/multimark/blob/main/src/multimark/_cmark.py#L726-L746){target=\"_blank\" rel=\"noopener\"}\n:::\n\n::: {.doc-signature .doc-Kind.FUNCTION}\n```python\ncmark_version()\n```\n:::\n\n::: {.doc-text}\n\nReports the version of the bundled cmark-gfm C library that multimark was compiled\nagainst. This is useful for debugging or confirming which release of the underlying\nparser is in use.\n:::\n\n## Returns {.doc-returns}\n\n::: {.doc-definition-items}\n<code> [str]{.doc-parameter-annotation}</code>\n\n: A version string in the format `\"X.Y.Z.gfm.N\"` (e.g., `\"0.29.0.gfm.13\"`).\n:::\n\n## Examples {.doc-examples}\n\n::: {#cb7f0531 .cell execution_count=1}\n``` {.python .cell-code}\nfrom multimark import cmark_version\n\ncmark_version()\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n'0.29.0.gfm.13'\n```\n:::\n:::\n\n\n",
|
|
6
|
+
"supporting": [
|
|
7
|
+
"cmark_version_files"
|
|
8
|
+
],
|
|
9
|
+
"filters": [],
|
|
10
|
+
"includes": {}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hash": "5b980bcea5ce0af477a36e566ab0bc1a",
|
|
3
|
+
"result": {
|
|
4
|
+
"engine": "jupyter",
|
|
5
|
+
"markdown": "---\ntitle: \"[markdown_to_commonmark()]{.doc-object-name .doc-function .doc-label .doc-label-function}\"\nbody-classes: doc-api-page\npage-navigation: false\nhtml-table-processing: none\n---\n\n::: {.doc-subject}\n\nParse CommonMark/GFM and render back as normalized CommonMark.\n:::\n\n::: {.doc-usage-source}\nUsage\n\n[Source](https://github.com/posit-dev/multimark/blob/main/src/multimark/_cmark.py#L598-L723){target=\"_blank\" rel=\"noopener\"}\n:::\n\n::: {.doc-signature .doc-Kind.FUNCTION}\n```python\nmarkdown_to_commonmark(\n text,\n *,\n hardbreaks=False,\n smart=False,\n normalize=False,\n unsafe=False,\n footnotes=False,\n extensions=(),\n width=0,\n options=0\n)\n```\n:::\n\n::: {.doc-text}\n\nParses the input Markdown into an AST and re-renders it as CommonMark. This\neffectively normalizes the formatting: different but semantically equivalent\nMarkdown inputs (e.g., `*italic*` vs `_italic_`, varying list indentation) will\nproduce a canonical output form.\n\nThis is useful for round-trip testing, canonical formatting, or cleaning up\ninconsistently formatted documents. The output of this function, when parsed again,\nproduces the same AST as the original input.\n:::\n\n## Parameters {.doc-parameters}\n\n::: {.doc-definition-items}\n<code>[text]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [str]{.doc-parameter-annotation}</code>\n\n: The Markdown string to parse and normalize. Must be a Python `str`.\n\n<code>[hardbreaks]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Render soft line breaks as hard breaks (backslash-newline). By default, this is\n `False`.\n\n<code>[smart]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Convert straight quotes to curly quotes, `--` to en-dashes, `---` to em-dashes,\n and `...` to ellipses. By default, this is `False`.\n\n<code>[normalize]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Consolidate adjacent text nodes in the parsed AST. By default, this is `False`.\n\n<code>[unsafe]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Allow raw HTML to pass through. By default, this is `False`, which replaces raw\n HTML with a comment placeholder.\n\n<code>[footnotes]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Enable footnote syntax parsing. By default, this is `False`.\n\n<code>[extensions]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [Sequence[str]]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [()<br>]{.doc-parameter-default}</code>\n\n: A sequence of GFM extension names to enable. Valid names are `\"table\"`,\n `\"strikethrough\"`, `\"autolink\"`, `\"tagfilter\"`, and `\"tasklist\"`.\n\n<code>[width]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [int]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[0]{.dv}]{.doc-parameter-default}</code>\n\n: The column at which to wrap output lines. Set to `0` (the default) to disable\n line wrapping entirely. This is useful for producing line-wrapped output for\n version-control-friendly diffs.\n\n<code>[options]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [int]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[0]{.dv}]{.doc-parameter-default}</code>\n\n: An integer bitmask of `Options` flags (e.g., `Options.SMART | Options.UNSAFE`).\n Merged via OR with any boolean keyword arguments set to `True`.\n Defaults to `0`.\n:::\n\n## Keyword Arguments Vs. Options Flags {.doc-keyword-arguments-vs-options-flags}\n\nThe boolean keyword arguments (`smart`, `unsafe`, `hardbreaks`, etc.) are convenience\nshortcuts for the most common `Options` flags. When both styles are provided, they\nare merged via OR. See `markdown_to_html()` for a detailed explanation.\n\n## Returns {.doc-returns}\n\n::: {.doc-definition-items}\n<code> [str]{.doc-parameter-annotation}</code>\n\n: The normalized CommonMark string.\n:::\n\n## Examples {.doc-examples}\n\nNormalize inconsistent formatting:\n\n::: {#04342f84 .cell execution_count=1}\n``` {.python .cell-code}\nfrom multimark import markdown_to_commonmark\n\nmarkdown_to_commonmark(\"_hello_ **world**\")\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n'*hello* **world**\\n'\n```\n:::\n:::\n\n\nVerify round-trip stability (parse, render, re-parse produces the same HTML):\n\n::: {#1c104cd0 .cell execution_count=2}\n``` {.python .cell-code}\nfrom multimark import markdown_to_commonmark, markdown_to_html\n\noriginal = \"**bold** and *italic*\"\nnormalized = markdown_to_commonmark(original)\nassert markdown_to_html(original) == markdown_to_html(normalized)\n```\n:::\n\n\nWrap at 80 columns for version-control-friendly output:\n\n::: {#623b5383 .cell execution_count=3}\n``` {.python .cell-code}\nlong_document = \"This is a long sentence for demonstration. \" * 10\nprint(markdown_to_commonmark(long_document, width=80))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\nThis is a long sentence for demonstration. This is a long sentence for\ndemonstration. This is a long sentence for demonstration. This is a long\nsentence for demonstration. This is a long sentence for demonstration. This is a\nlong sentence for demonstration. This is a long sentence for demonstration. This\nis a long sentence for demonstration. This is a long sentence for demonstration.\nThis is a long sentence for demonstration.\n\n```\n:::\n:::\n\n\n",
|
|
6
|
+
"supporting": [
|
|
7
|
+
"markdown_to_commonmark_files"
|
|
8
|
+
],
|
|
9
|
+
"filters": [],
|
|
10
|
+
"includes": {}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hash": "02756b31c68964596dda3163f52e750c",
|
|
3
|
+
"result": {
|
|
4
|
+
"engine": "jupyter",
|
|
5
|
+
"markdown": "---\ntitle: \"[markdown_to_html()]{.doc-object-name .doc-function .doc-label .doc-label-function}\"\nbody-classes: doc-api-page\npage-navigation: false\nhtml-table-processing: none\n---\n\n::: {.doc-subject}\n\nParse CommonMark/GFM and render as HTML.\n:::\n\n::: {.doc-usage-source}\nUsage\n\n[Source](https://github.com/posit-dev/multimark/blob/main/src/multimark/_cmark.py#L78-L232){target=\"_blank\" rel=\"noopener\"}\n:::\n\n::: {.doc-signature .doc-Kind.FUNCTION}\n```python\nmarkdown_to_html(\n text,\n *,\n hardbreaks=False,\n smart=False,\n normalize=False,\n sourcepos=False,\n unsafe=False,\n footnotes=False,\n extensions=(),\n options=0\n)\n```\n:::\n\n::: {.doc-text}\n\nTakes a Markdown string and returns the corresponding HTML output. By default,\nraw HTML embedded in the Markdown is stripped for security (replaced with an HTML\ncomment). Set `unsafe=True` to allow raw HTML passthrough.\n\nThe parser is fully [CommonMark spec](https://spec.commonmark.org/) compliant. When\nGFM extensions are enabled via `extensions=`, additional syntax is recognized\n(tables, strikethrough, autolinks, tag filtering, and task lists).\n:::\n\n## Parameters {.doc-parameters}\n\n::: {.doc-definition-items}\n<code>[text]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [str]{.doc-parameter-annotation}</code>\n\n: The Markdown string to parse and render. Can be any length, from a single\n inline fragment to a full document. Must be a Python `str` (not bytes).\n\n<code>[hardbreaks]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Render soft line breaks (single newlines within a paragraph) as `<br />` tags.\n By default, this is `False` and soft breaks are rendered as spaces, matching the\n CommonMark specification behavior.\n\n<code>[smart]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Convert straight quotes to curly quotes, `--` to en-dashes, `---` to em-dashes,\n and `...` to ellipses. By default, this is `False`.\n\n<code>[normalize]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Consolidate adjacent text nodes in the parsed AST before rendering. This can\n produce slightly cleaner output in edge cases. By default, this is `False`.\n\n<code>[sourcepos]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Include `data-sourcepos` attributes on block-level HTML elements indicating\n their line/column positions in the original Markdown source. Useful for building\n editors or source-mapping tools. By default, this is `False`.\n\n<code>[unsafe]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Allow raw HTML and potentially dangerous links to pass through to the output\n without sanitization. When `False` (the default), raw HTML blocks and inline\n HTML are replaced with a comment `<!-- raw HTML omitted -->`, and dangerous\n URLs (e.g., `javascript:`) are suppressed.\n\n<code>[footnotes]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Enable footnote syntax parsing. When `True`, `[^label]` markers and\n `[^label]: content` definitions are recognized and rendered as numbered\n footnotes with backlinks. By default, this is `False`.\n\n<code>[extensions]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [Sequence[str]]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [()<br>]{.doc-parameter-default}</code>\n\n: A sequence of GFM extension names to enable during parsing. Valid names are\n `\"table\"`, `\"strikethrough\"`, `\"autolink\"`, `\"tagfilter\"`, and `\"tasklist\"`.\n An empty sequence (the default) parses standard CommonMark only.\n\n<code>[options]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [int]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[0]{.dv}]{.doc-parameter-default}</code>\n\n: An integer bitmask of `Options` flags. Build it by OR-ing flags together, e.g.,\n `Options.SMART | Options.UNSAFE`. This value is combined (via OR) with any named\n boolean parameters that are set to `True`, so you can mix both styles freely.\n Defaults to `0` (no additional flags beyond those set by keyword arguments).\n:::\n\n## Keyword Arguments Vs. Options Flags {.doc-keyword-arguments-vs-options-flags}\n\nThe boolean keyword arguments (`smart`, `unsafe`, `hardbreaks`, etc.) are convenience\nshortcuts for the most common `Options` flags. Using `smart=True` is equivalent to\npassing `options=Options.SMART`. When both are provided, they are merged:\n`markdown_to_html(text, smart=True, options=Options.UNSAFE)` is the same as\n`options=Options.SMART | Options.UNSAFE`.\n\nSome flags (like `Options.GITHUB_PRE_LANG`, `Options.STRIKETHROUGH_DOUBLE_TILDE`,\nand `Options.LIBERAL_HTML_TAG`) have no keyword shortcut and can only be set via\nthe `options` parameter.\n\n## Returns {.doc-returns}\n\n::: {.doc-definition-items}\n<code> [str]{.doc-parameter-annotation}</code>\n\n: The rendered HTML string. Block-level elements end with a trailing newline.\n:::\n\n## Examples {.doc-examples}\n\nRender basic Markdown to HTML:\n\n::: {#b8b75ace .cell execution_count=1}\n``` {.python .cell-code}\nfrom multimark import markdown_to_html\n\nmarkdown_to_html(\"**bold** and *italic*\")\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n'<p><strong>bold</strong> and <em>italic</em></p>\\n'\n```\n:::\n:::\n\n\nEnable smart punctuation:\n\n::: {#2f9dd094 .cell execution_count=2}\n``` {.python .cell-code}\nmarkdown_to_html('\"Hello\" -- world...', smart=True)\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n'<p>“Hello” – world…</p>\\n'\n```\n:::\n:::\n\n\nAllow raw HTML passthrough:\n\n::: {#51c52fb6 .cell execution_count=3}\n``` {.python .cell-code}\nmarkdown_to_html(\"<div>custom</div>\", unsafe=True)\n```\n\n::: {.cell-output .cell-output-display execution_count=3}\n```\n'<div>custom</div>\\n'\n```\n:::\n:::\n\n\nUse GFM table extension:\n\n::: {#0580635c .cell execution_count=4}\n``` {.python .cell-code}\nmarkdown_to_html(\n \"| A | B |\\n|---|---|\\n| 1 | 2 |\\n\",\n extensions=[\"table\"],\n)\n```\n\n::: {.cell-output .cell-output-display execution_count=4}\n```\n'<table>\\n<thead>\\n<tr>\\n<th>A</th>\\n<th>B</th>\\n</tr>\\n</thead>\\n<tbody>\\n<tr>\\n<td>1</td>\\n<td>2</td>\\n</tr>\\n</tbody>\\n</table>\\n'\n```\n:::\n:::\n\n\nCombine multiple features:\n\n::: {#f130ac5e .cell execution_count=5}\n``` {.python .cell-code}\nmarkdown_to_html(\n \"~~old~~ -> new\\n\\nVisit https://example.com\\n\",\n extensions=[\"strikethrough\", \"autolink\"],\n smart=True,\n)\n```\n\n::: {.cell-output .cell-output-display execution_count=5}\n```\n'<p><del>old</del> -> new</p>\\n<p>Visit <a href=\"https://example.com\">https://example.com</a></p>\\n'\n```\n:::\n:::\n\n\n",
|
|
6
|
+
"supporting": [
|
|
7
|
+
"markdown_to_html_files"
|
|
8
|
+
],
|
|
9
|
+
"filters": [],
|
|
10
|
+
"includes": {}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hash": "3970322368642e8308549c31b299e3cd",
|
|
3
|
+
"result": {
|
|
4
|
+
"engine": "jupyter",
|
|
5
|
+
"markdown": "---\ntitle: \"[markdown_to_latex()]{.doc-object-name .doc-function .doc-label .doc-label-function}\"\nbody-classes: doc-api-page\npage-navigation: false\nhtml-table-processing: none\n---\n\n::: {.doc-subject}\n\nParse CommonMark/GFM and render as LaTeX.\n:::\n\n::: {.doc-usage-source}\nUsage\n\n[Source](https://github.com/posit-dev/multimark/blob/main/src/multimark/_cmark.py#L348-L474){target=\"_blank\" rel=\"noopener\"}\n:::\n\n::: {.doc-signature .doc-Kind.FUNCTION}\n```python\nmarkdown_to_latex(\n text,\n *,\n hardbreaks=False,\n smart=False,\n normalize=False,\n unsafe=False,\n footnotes=False,\n extensions=(),\n width=0,\n options=0\n)\n```\n:::\n\n::: {.doc-text}\n\nConverts Markdown to LaTeX source suitable for inclusion in a `.tex` document.\nInline formatting maps to LaTeX commands (`\\textbf{}`, `\\emph{}`, `\\texttt{}`),\nheadings become sectioning commands (`\\section{}`, `\\subsection{}`, etc.), and\nlinks use `\\href{}{}`.\n\nThe output is a fragment (not a full document): it does not include\n`\\documentclass`, `\\begin{document}`, or preamble. You can concatenate it into\nyour own LaTeX document structure.\n:::\n\n## Parameters {.doc-parameters}\n\n::: {.doc-definition-items}\n<code>[text]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [str]{.doc-parameter-annotation}</code>\n\n: The Markdown string to parse and render. Must be a Python `str`.\n\n<code>[hardbreaks]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Render soft line breaks as hard breaks (`\\\\`). By default, this is `False`.\n\n<code>[smart]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Convert straight quotes to curly quotes, `--` to en-dashes, `---` to em-dashes,\n and `...` to ellipses. By default, this is `False`.\n\n<code>[normalize]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Consolidate adjacent text nodes in the parsed AST. By default, this is `False`.\n\n<code>[unsafe]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Allow raw HTML to pass through. Since LaTeX is the target format, raw HTML is\n typically irrelevant. By default, this is `False`.\n\n<code>[footnotes]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Enable footnote syntax parsing. By default, this is `False`.\n\n<code>[extensions]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [Sequence[str]]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [()<br>]{.doc-parameter-default}</code>\n\n: A sequence of GFM extension names to enable. Valid names are `\"table\"`,\n `\"strikethrough\"`, `\"autolink\"`, `\"tagfilter\"`, and `\"tasklist\"`.\n\n<code>[width]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [int]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[0]{.dv}]{.doc-parameter-default}</code>\n\n: The column at which to wrap output lines. Set to `0` (the default) to disable\n line wrapping entirely. A value like `80` produces lines of at most 80\n characters where possible.\n\n<code>[options]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [int]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[0]{.dv}]{.doc-parameter-default}</code>\n\n: An integer bitmask of `Options` flags (e.g., `Options.SMART | Options.UNSAFE`).\n Merged via OR with any boolean keyword arguments set to `True`.\n Defaults to `0`.\n:::\n\n## Keyword Arguments Vs. Options Flags {.doc-keyword-arguments-vs-options-flags}\n\nThe boolean keyword arguments (`smart`, `unsafe`, `hardbreaks`, etc.) are convenience\nshortcuts for the most common `Options` flags. When both styles are provided, they\nare merged via OR. See `markdown_to_html()` for a detailed explanation.\n\n## Returns {.doc-returns}\n\n::: {.doc-definition-items}\n<code> [str]{.doc-parameter-annotation}</code>\n\n: The rendered LaTeX string.\n:::\n\n## Examples {.doc-examples}\n\nRender inline formatting:\n\n::: {#19d00450 .cell execution_count=1}\n``` {.python .cell-code}\nfrom multimark import markdown_to_latex\n\nmarkdown_to_latex(\"**bold** and *italic*\")\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n'\\\\textbf{bold} and \\\\emph{italic}\\n'\n```\n:::\n:::\n\n\nRender a heading:\n\n::: {#8b187a3d .cell execution_count=2}\n``` {.python .cell-code}\nmarkdown_to_latex(\"# Introduction\")\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n'\\\\section{Introduction}\\n'\n```\n:::\n:::\n\n\nEnable line wrapping at 72 columns:\n\n::: {#230ea992 .cell execution_count=3}\n``` {.python .cell-code}\nlong_text = \"This is a very long paragraph. \" * 10\nprint(markdown_to_latex(long_text, width=72))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\nThis is a very long paragraph. This is a very long paragraph. This is a\nvery long paragraph. This is a very long paragraph. This is a very long\nparagraph. This is a very long paragraph. This is a very long paragraph.\nThis is a very long paragraph. This is a very long paragraph. This is a\nvery long paragraph.\n\n```\n:::\n:::\n\n\nUse smart punctuation for typographic output:\n\n::: {#f317a4df .cell execution_count=4}\n``` {.python .cell-code}\nmarkdown_to_latex('\"Hello,\" she said --- \"goodbye.\"', smart=True)\n```\n\n::: {.cell-output .cell-output-display execution_count=4}\n```\n\"``Hello,'' she said --- ``goodbye.''\\n\"\n```\n:::\n:::\n\n\n",
|
|
6
|
+
"supporting": [
|
|
7
|
+
"markdown_to_latex_files"
|
|
8
|
+
],
|
|
9
|
+
"filters": [],
|
|
10
|
+
"includes": {}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hash": "790461a9040615c8871c67d92cbe0b9a",
|
|
3
|
+
"result": {
|
|
4
|
+
"engine": "jupyter",
|
|
5
|
+
"markdown": "---\ntitle: \"[markdown_to_man()]{.doc-object-name .doc-function .doc-label .doc-label-function}\"\nbody-classes: doc-api-page\npage-navigation: false\nhtml-table-processing: none\n---\n\n::: {.doc-subject}\n\nParse CommonMark/GFM and render as a groff man page.\n:::\n\n::: {.doc-usage-source}\nUsage\n\n[Source](https://github.com/posit-dev/multimark/blob/main/src/multimark/_cmark.py#L477-L595){target=\"_blank\" rel=\"noopener\"}\n:::\n\n::: {.doc-signature .doc-Kind.FUNCTION}\n```python\nmarkdown_to_man(\n text,\n *,\n hardbreaks=False,\n smart=False,\n normalize=False,\n unsafe=False,\n footnotes=False,\n extensions=(),\n width=0,\n options=0\n)\n```\n:::\n\n::: {.doc-text}\n\nProduces groff-format output suitable for use with the `man` command or inclusion\nin manual page source files. Inline formatting maps to font switching requests\n(`\\f[B]`, `\\f[I]`, `\\f[CR]`), paragraphs use `.PP`, and headings use `.SH` or\n`.SS` macros.\n\nThe output is a fragment and does not include a `.TH` title header. Wrap it in your\nown man page structure to produce a complete manual page.\n:::\n\n## Parameters {.doc-parameters}\n\n::: {.doc-definition-items}\n<code>[text]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [str]{.doc-parameter-annotation}</code>\n\n: The Markdown string to parse and render. Must be a Python `str`.\n\n<code>[hardbreaks]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Render soft line breaks as hard breaks (`.br`). By default, this is `False`.\n\n<code>[smart]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Convert straight quotes to curly quotes, `--` to en-dashes, `---` to em-dashes,\n and `...` to ellipses. By default, this is `False`.\n\n<code>[normalize]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Consolidate adjacent text nodes in the parsed AST. By default, this is `False`.\n\n<code>[unsafe]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Allow raw HTML to pass through. Since groff is the target format, raw HTML is\n typically irrelevant. By default, this is `False`.\n\n<code>[footnotes]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Enable footnote syntax parsing. By default, this is `False`.\n\n<code>[extensions]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [Sequence[str]]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [()<br>]{.doc-parameter-default}</code>\n\n: A sequence of GFM extension names to enable. Valid names are `\"table\"`,\n `\"strikethrough\"`, `\"autolink\"`, `\"tagfilter\"`, and `\"tasklist\"`.\n\n<code>[width]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [int]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[0]{.dv}]{.doc-parameter-default}</code>\n\n: The column at which to wrap output lines. Set to `0` (the default) to disable\n line wrapping entirely.\n\n<code>[options]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [int]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[0]{.dv}]{.doc-parameter-default}</code>\n\n: An integer bitmask of `Options` flags (e.g., `Options.SMART | Options.UNSAFE`).\n Merged via OR with any boolean keyword arguments set to `True`.\n Defaults to `0`.\n:::\n\n## Keyword Arguments Vs. Options Flags {.doc-keyword-arguments-vs-options-flags}\n\nThe boolean keyword arguments (`smart`, `unsafe`, `hardbreaks`, etc.) are convenience\nshortcuts for the most common `Options` flags. When both styles are provided, they\nare merged via OR. See `markdown_to_html()` for a detailed explanation.\n\n## Returns {.doc-returns}\n\n::: {.doc-definition-items}\n<code> [str]{.doc-parameter-annotation}</code>\n\n: The rendered groff man page string.\n:::\n\n## Examples {.doc-examples}\n\nRender a paragraph with bold and italic:\n\n::: {#88e363be .cell execution_count=1}\n``` {.python .cell-code}\nfrom multimark import markdown_to_man\n\nmarkdown_to_man(\"**bold** and *italic*\")\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n'.PP\\n\\\\f[B]bold\\\\f[] and \\\\f[I]italic\\\\f[]\\n'\n```\n:::\n:::\n\n\nRender a heading:\n\n::: {#ce6c93ce .cell execution_count=2}\n``` {.python .cell-code}\nmarkdown_to_man(\"## Options\")\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n'.SS\\nOptions\\n'\n```\n:::\n:::\n\n\nWrap at 72 columns:\n\n::: {#706522ae .cell execution_count=3}\n``` {.python .cell-code}\nlong_paragraph = \"This is a long paragraph of text. \" * 10\nprint(markdown_to_man(long_paragraph, width=72))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n.PP\nThis is a long paragraph of text. This is a long paragraph of text. This\nis a long paragraph of text. This is a long paragraph of text. This is a\nlong paragraph of text. This is a long paragraph of text. This is a long\nparagraph of text. This is a long paragraph of text. This is a long\nparagraph of text. This is a long paragraph of text.\n\n```\n:::\n:::\n\n\n",
|
|
6
|
+
"supporting": [
|
|
7
|
+
"markdown_to_man_files"
|
|
8
|
+
],
|
|
9
|
+
"filters": [],
|
|
10
|
+
"includes": {}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hash": "0ed18dda64f753582a9c273e25ee232b",
|
|
3
|
+
"result": {
|
|
4
|
+
"engine": "jupyter",
|
|
5
|
+
"markdown": "---\ntitle: \"[markdown_to_xml()]{.doc-object-name .doc-function .doc-label .doc-label-function}\"\nbody-classes: doc-api-page\npage-navigation: false\nhtml-table-processing: none\n---\n\n::: {.doc-subject}\n\nParse CommonMark/GFM and render as XML.\n:::\n\n::: {.doc-usage-source}\nUsage\n\n[Source](https://github.com/posit-dev/multimark/blob/main/src/multimark/_cmark.py#L235-L345){target=\"_blank\" rel=\"noopener\"}\n:::\n\n::: {.doc-signature .doc-Kind.FUNCTION}\n```python\nmarkdown_to_xml(\n text,\n *,\n hardbreaks=False,\n smart=False,\n normalize=False,\n sourcepos=False,\n unsafe=False,\n footnotes=False,\n extensions=(),\n options=0\n)\n```\n:::\n\n::: {.doc-text}\n\nProduces an XML representation of the parsed abstract syntax tree (AST). Each\nMarkdown construct is represented as a named element (e.g., `<paragraph>`,\n`<strong>`, `<code_block>`), with text content preserved in `<text>` elements.\n\nThe XML output conforms to the CommonMark DTD and includes an XML declaration and\nDOCTYPE. This format is useful for debugging, AST inspection, or piping into\nXML-based toolchains.\n:::\n\n## Parameters {.doc-parameters}\n\n::: {.doc-definition-items}\n<code>[text]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [str]{.doc-parameter-annotation}</code>\n\n: The Markdown string to parse and render. Must be a Python `str`.\n\n<code>[hardbreaks]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Render soft line breaks as hard breaks in the AST. By default, this is `False`.\n\n<code>[smart]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Convert straight quotes to curly quotes, `--` to en-dashes, `---` to em-dashes,\n and `...` to ellipses. By default, this is `False`.\n\n<code>[normalize]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Consolidate adjacent text nodes in the parsed AST. By default, this is `False`.\n\n<code>[sourcepos]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Include `sourcepos` attributes on elements indicating their line/column\n positions in the original Markdown source. By default, this is `False`.\n\n<code>[unsafe]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Allow raw HTML to pass through. By default, this is `False`.\n\n<code>[footnotes]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [bool]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[False]{.va}]{.doc-parameter-default}</code>\n\n: Enable footnote syntax parsing. By default, this is `False`.\n\n<code>[extensions]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [Sequence[str]]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [()<br>]{.doc-parameter-default}</code>\n\n: A sequence of GFM extension names to enable. Valid names are `\"table\"`,\n `\"strikethrough\"`, `\"autolink\"`, `\"tagfilter\"`, and `\"tasklist\"`.\n\n<code>[options]{.doc-parameter-name}[:]{.doc-parameter-annotation-sep} [int]{.doc-parameter-annotation} [=]{.doc-parameter-default-sep .op} [[0]{.dv}]{.doc-parameter-default}</code>\n\n: An integer bitmask of `Options` flags (e.g., `Options.SMART | Options.UNSAFE`).\n Merged via OR with any boolean keyword arguments set to `True`.\n Defaults to `0`.\n:::\n\n## Keyword Arguments Vs. Options Flags {.doc-keyword-arguments-vs-options-flags}\n\nThe boolean keyword arguments (`smart`, `unsafe`, `hardbreaks`, etc.) are convenience\nshortcuts for the most common `Options` flags. When both styles are provided, they\nare merged via OR. See `markdown_to_html()` for a detailed explanation.\n\n## Returns {.doc-returns}\n\n::: {.doc-definition-items}\n<code> [str]{.doc-parameter-annotation}</code>\n\n: The rendered XML string, including the XML declaration and DOCTYPE.\n:::\n\n## Examples {.doc-examples}\n\nInspect the AST structure of a simple document:\n\n::: {#18de299e .cell execution_count=1}\n``` {.python .cell-code}\nfrom multimark import markdown_to_xml\n\nprint(markdown_to_xml(\"**hello**\"))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n<document xmlns=\"http://commonmark.org/xml/1.0\">\n <paragraph>\n <strong>\n <text xml:space=\"preserve\">hello</text>\n </strong>\n </paragraph>\n</document>\n\n```\n:::\n:::\n\n\nAdd source position information:\n\n::: {#695b81c3 .cell execution_count=2}\n``` {.python .cell-code}\nmarkdown_to_xml(\"# Title\\n\\nBody text\\n\", sourcepos=True)\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\\n<document sourcepos=\"1:1-3:9\" xmlns=\"http://commonmark.org/xml/1.0\">\\n <heading sourcepos=\"1:1-1:7\" level=\"1\">\\n <text sourcepos=\"1:3-1:7\" xml:space=\"preserve\">Title</text>\\n </heading>\\n <paragraph sourcepos=\"3:1-3:9\">\\n <text sourcepos=\"3:1-3:9\" xml:space=\"preserve\">Body text</text>\\n </paragraph>\\n</document>\\n'\n```\n:::\n:::\n\n\n",
|
|
6
|
+
"supporting": [
|
|
7
|
+
"markdown_to_xml_files"
|
|
8
|
+
],
|
|
9
|
+
"filters": [],
|
|
10
|
+
"includes": {}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Licensed MIT © Zeno Rocha
|
|
6
6
|
*/
|
|
7
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),r=n.n(e);function c(t){try{return document.execCommand(t)}catch(t){return}}var a=function(t){t=r()(t);return c("cut"),t};function o(t,e){var n,o,t=(n=t,o="rtl"===document.documentElement.getAttribute("dir"),(t=document.createElement("textarea")).style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,t.style.top="".concat(o,"px"),t.setAttribute("readonly",""),t.value=n,t);return e.container.appendChild(t),e=r()(t),c("copy"),t.remove(),e}var f=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof t?n=o(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?n=o(t.value,e):(n=r()(t),c("copy")),n};function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==l(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?f(t,{container:o}):e?"cut"===n?a(e):f(e,{container:o}):void 0};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=v(n);return t=o?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==p(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var b=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return f(t,e)}},{key:"cut",value:function(t){return a(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",t=s({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(t?"success":"error",{action:n,text:t,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return m("action",t)}},{key:"defaultTarget",value:function(t){t=m("target",t);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(t){return m("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}])&&d(t.prototype,e),n&&d(t,n),r}()},828:function(t){var e;"undefined"==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var u=n(828);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=u(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},879:function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var f=n(879),l=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!f.string(e))throw new TypeError("Second argument must be a String");if(!f.fn(n))throw new TypeError("Third argument must be a Function");if(f.node(t))return c=e,a=n,(u=t).addEventListener(c,a),{destroy:function(){u.removeEventListener(c,a)}};if(f.nodeList(t))return o=t,r=e,i=n,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,i)}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,i)})}};if(f.string(t))return t=t,e=e,n=n,l(document.body,t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,u,c,a}},817:function(t){t.exports=function(t){var e,n="SELECT"===t.nodeName?(t.focus(),t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?((e=t.hasAttribute("readonly"))||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute("readonly"),t.value):(t.hasAttribute("contenteditable")&&t.focus(),n=window.getSelection(),(e=document.createRange()).selectNodeContents(t),n.removeAllRanges(),n.addRange(e),n.toString());return n}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,u=o.length;i<u;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},r={},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o(686).default;function o(t){if(r[t])return r[t].exports;var e=r[t]={exports:{}};return n[t](e,e.exports,o),e.exports}var n,r});
|
|
7
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),r=n.n(e);function c(t){try{return document.execCommand(t)}catch(t){return}}var a=function(t){t=r()(t);return c("cut"),t};function o(t,e){var n,o,t=(n=t,o="rtl"===document.documentElement.getAttribute("dir"),(t=document.createElement("textarea")).style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,t.style.top="".concat(o,"px"),t.setAttribute("readonly",""),t.value=n,t);return e.container.appendChild(t),e=r()(t),c("copy"),t.remove(),e}var f=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof t?n=o(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?n=o(t.value,e):(n=r()(t),c("copy")),n};function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==l(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?f(t,{container:o}):e?"cut"===n?a(e):f(e,{container:o}):void 0};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=v(n);return t=o?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==p(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var b=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return f(t,e)}},{key:"cut",value:function(t){return a(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",t=s({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(t?"success":"error",{action:n,text:t,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return m("action",t)}},{key:"defaultTarget",value:function(t){t=m("target",t);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(t){return m("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}])&&d(t.prototype,e),n&&d(t,n),r}()},828:function(t){var e;"undefined"==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var u=n(828);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=u(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},879:function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var f=n(879),l=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!f.string(e))throw new TypeError("Second argument must be a String");if(!f.fn(n))throw new TypeError("Third argument must be a Function");if(f.node(t))return c=e,a=n,(u=t).addEventListener(c,a),{destroy:function(){u.removeEventListener(c,a)}};if(f.nodeList(t))return o=t,r=e,i=n,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,i)}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,i)})}};if(f.string(t))return t=t,e=e,n=n,l(document.body,t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,u,c,a}},817:function(t){t.exports=function(t){var e,n="SELECT"===t.nodeName?(t.focus(),t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?((e=t.hasAttribute("readonly"))||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute("readonly"),t.value):(t.hasAttribute("contenteditable")&&t.focus(),n=window.getSelection(),(e=document.createRange()).selectNodeContents(t),n.removeAllRanges(),n.addRange(e),n.toString());return n}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,u=o.length;i<u;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},r={},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o(686).default;function o(t){if(r[t])return r[t].exports;var e=r[t]={exports:{}};return n[t](e,e.exports,o),e.exports}var n,r});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hash": "2d574431c666687beb663a4f712e95f4",
|
|
3
|
+
"result": {
|
|
4
|
+
"engine": "jupyter",
|
|
5
|
+
"markdown": "---\ntitle: \"GFM Extensions\"\nguide-section: \"Core Concepts\"\ntags: [Extensions, HTML, Tables]\nbread-crumbs: false\n---\n\nThis page explains the five GitHub Flavored Markdown extensions that multimark supports, with examples showing how each one works and how to combine them.\n\n## What Are GFM Extensions?\n\nGitHub Flavored Markdown (GFM) extends the CommonMark specification with five additional\nsyntax features. These are the constructs that GitHub recognizes in README files, issues,\nand pull requests but that are not part of the base CommonMark spec.\n\nMultimark supports all five GFM extensions through the `extensions` parameter, which\naccepts a sequence of extension names. Extensions are disabled by default so that the\nparser remains strictly CommonMark-compliant unless you opt in.\n\n::: {#5b0943cd .cell execution_count=1}\n``` {.python .cell-code}\nfrom multimark import VALID_EXTENSIONS\n\nsorted(VALID_EXTENSIONS)\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n['autolink', 'strikethrough', 'table', 'tagfilter', 'tasklist']\n```\n:::\n:::\n\n\nEach extension is independent: you enable only the ones you need.\n\n## Tables\n\nThe `table` extension adds pipe-table syntax. Columns are separated by `|` characters,\nand a header row is separated from body rows by a line of dashes.\n\n::: {#7ec62208 .cell execution_count=2}\n``` {.python .cell-code}\nfrom multimark import markdown_to_html\n\ntable_md = \"\"\"\\\n| Feature | Status |\n|------------|--------|\n| Tables | ✓ |\n| Autolinks | ✓ |\n| Tasklists | ✓ |\n\"\"\"\n\nprint(markdown_to_html(table_md, extensions=[\"table\"]))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n<table>\n<thead>\n<tr>\n<th>Feature</th>\n<th>Status</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Tables</td>\n<td>✓</td>\n</tr>\n<tr>\n<td>Autolinks</td>\n<td>✓</td>\n</tr>\n<tr>\n<td>Tasklists</td>\n<td>✓</td>\n</tr>\n</tbody>\n</table>\n\n```\n:::\n:::\n\n\nColumn alignment is controlled with colons in the separator row: `:---` for left,\n`:---:` for center, and `---:` for right. The renderer emits `style=\"text-align: ...\"`\nattributes on the `<th>` and `<td>` elements.\n\n::: {#6d655856 .cell execution_count=3}\n``` {.python .cell-code}\naligned = \"\"\"\\\n| Left | Center | Right |\n|:-----|:------:|------:|\n| a | b | c |\n\"\"\"\n\nprint(markdown_to_html(aligned, extensions=[\"table\"]))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n<table>\n<thead>\n<tr>\n<th align=\"left\">Left</th>\n<th align=\"center\">Center</th>\n<th align=\"right\">Right</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\">a</td>\n<td align=\"center\">b</td>\n<td align=\"right\">c</td>\n</tr>\n</tbody>\n</table>\n\n```\n:::\n:::\n\n\n## Strikethrough\n\nThe `strikethrough` extension recognizes `~~text~~` as deleted content, rendering it\nwith `<del>` tags.\n\n::: {#f9d9bc11 .cell execution_count=4}\n``` {.python .cell-code}\nprint(markdown_to_html(\"This is ~~no longer~~ relevant.\", extensions=[\"strikethrough\"]))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n<p>This is <del>no longer</del> relevant.</p>\n\n```\n:::\n:::\n\n\nStrikethrough works inline alongside other formatting. You can combine it with bold,\nitalic, and code spans without issue.\n\n::: {#b3b968e6 .cell execution_count=5}\n``` {.python .cell-code}\ncombined = \"~~**bold and struck**~~ and ~~`code struck`~~\"\nprint(markdown_to_html(combined, extensions=[\"strikethrough\"]))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n<p><del><strong>bold and struck</strong></del> and <del><code>code struck</code></del></p>\n\n```\n:::\n:::\n\n\n## Autolinks\n\nThe `autolink` extension automatically converts bare URLs and email addresses into\nclickable links without requiring explicit Markdown link syntax.\n\n::: {#0013b6ce .cell execution_count=6}\n``` {.python .cell-code}\ntext = \"\"\"\\\nVisit https://github.com for more info.\n\nSend feedback to user@example.com.\n\"\"\"\n\nprint(markdown_to_html(text, extensions=[\"autolink\"]))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n<p>Visit <a href=\"https://github.com\">https://github.com</a> for more info.</p>\n<p>Send feedback to <a href=\"mailto:user@example.com\">user@example.com</a>.</p>\n\n```\n:::\n:::\n\n\nThis is the same behavior you see on GitHub: any URL starting with `http://` or\n`https://` becomes a link, and email addresses get `mailto:` links.\n\n## Tag Filtering\n\nThe `tagfilter` extension suppresses a specific set of HTML tags that could be used for\nXSS attacks, even when `unsafe=True` is set. The filtered tags are: `<textarea>`,\n`<style>`, `<xmp>`, `<iframe>`, `<noembed>`, `<noframes>`, `<script>`, and `<plaintext>`.\n\n::: {#6cdd974c .cell execution_count=7}\n``` {.python .cell-code}\nhtml_input = \"Before <script>alert('xss')</script> after\"\nprint(markdown_to_html(html_input, unsafe=True, extensions=[\"tagfilter\"]))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n<p>Before <script>alert('xss')</script> after</p>\n\n```\n:::\n:::\n\n\nThe tags are not removed entirely. Instead, the opening `<` is replaced with `<`,\nrendering them inert while preserving the text content for visibility. This matches\nGitHub's behavior for user-generated content.\n\n## Task Lists\n\nThe `tasklist` extension renders list items that begin with `[ ]` or `[x]` as checkbox\nitems with a special CSS class.\n\n::: {#03f4eb42 .cell execution_count=8}\n``` {.python .cell-code}\ntasks = \"\"\"\\\n- [x] Write documentation\n- [x] Add tests\n- [ ] Publish release\n\"\"\"\n\nprint(markdown_to_html(tasks, extensions=[\"tasklist\"]))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n<ul>\n<li><input type=\"checkbox\" checked=\"\" disabled=\"\" /> Write documentation</li>\n<li><input type=\"checkbox\" checked=\"\" disabled=\"\" /> Add tests</li>\n<li><input type=\"checkbox\" disabled=\"\" /> Publish release</li>\n</ul>\n\n```\n:::\n:::\n\n\nThe checkboxes are rendered as `<input>` elements with `type=\"checkbox\"` and a\n`disabled` attribute (since they are static content, not interactive form elements).\n\n## Combining Extensions\n\nExtensions compose freely. Enable as many as you need by passing multiple names in the\n`extensions` list.\n\n::: {#39306003 .cell execution_count=9}\n``` {.python .cell-code}\ndoc = \"\"\"\\\n## Release Notes\n\n| Change | Status |\n|---------------|--------------|\n| ~~Old API~~ | Removed |\n| New API | Added |\n\nTasks remaining:\n\n- [x] Update docs at https://example.com/docs\n- [ ] Tag release\n\nContact: releases@example.com\n\"\"\"\n\nprint(markdown_to_html(doc, extensions=[\"table\", \"strikethrough\", \"tasklist\", \"autolink\"]))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n<h2>Release Notes</h2>\n<table>\n<thead>\n<tr>\n<th>Change</th>\n<th>Status</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><del>Old API</del></td>\n<td>Removed</td>\n</tr>\n<tr>\n<td>New API</td>\n<td>Added</td>\n</tr>\n</tbody>\n</table>\n<p>Tasks remaining:</p>\n<ul>\n<li><input type=\"checkbox\" checked=\"\" disabled=\"\" /> Update docs at <a href=\"https://example.com/docs\">https://example.com/docs</a></li>\n<li><input type=\"checkbox\" disabled=\"\" /> Tag release</li>\n</ul>\n<p>Contact: <a href=\"mailto:releases@example.com\">releases@example.com</a></p>\n\n```\n:::\n:::\n\n\nThe order of extension names in the list does not matter. The parser enables all\nrequested extensions before processing the input.\n\n## Extensions with Other Renderers\n\nGFM extensions work with all five output formats, not just HTML. Here is the same table\nrendered as LaTeX.\n\n::: {#3310b0f8 .cell execution_count=10}\n``` {.python .cell-code}\nfrom multimark import markdown_to_latex\n\nprint(markdown_to_latex(table_md, extensions=[\"table\"]))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n\\begin{table}\n\\begin{tabular}{ll}\nFeature & Status \\\\\nTables & ✓ \\\\\nAutolinks & ✓ \\\\\nTasklists & ✓ \\\\\n\\end{tabular}\n\\end{table}\n\n```\n:::\n:::\n\n\nThe LaTeX renderer maps table structure to `tabular` environments. Each renderer\ntranslates extension syntax into its native equivalent where possible.\n\n",
|
|
6
|
+
"supporting": [
|
|
7
|
+
"gfm-extensions_files"
|
|
8
|
+
],
|
|
9
|
+
"filters": [],
|
|
10
|
+
"includes": {}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hash": "c7fbbecdc897c4ecb2d40cb01e4d3b47",
|
|
3
|
+
"result": {
|
|
4
|
+
"engine": "jupyter",
|
|
5
|
+
"markdown": "---\ntitle: \"Installation\"\nguide-section: \"Getting Started\"\ntags: [Setup]\nbread-crumbs: false\n---\n\nThis page covers everything you need to get multimark installed and working on your system, from prerequisites through verification.\n\n## Requirements\n\nMultimark requires Python 3.9 or later and a C compiler available at install time. The\nCFFI build step compiles the vendored cmark-gfm C library into a shared object that\nPython loads at runtime.\n\nOn most systems, the necessary build tools are already present. If you are working in a\nminimal container or a fresh virtual machine, you may need to install a compiler\ntoolchain first.\n\n::: {.details summary=\"Platform-specific compiler setup\" icon=\"monitor\"}\n\n**macOS**: Install the Xcode command-line tools if you have not already.\n\n```bash\nxcode-select --install\n```\n\n**Ubuntu / Debian**:\n\n```bash\nsudo apt-get install build-essential python3-dev\n```\n\n**Windows**: Install the [Build Tools for Visual Studio](https://visualstudio.microsoft.com/visual-cpp-build-tools/).\nSelect the \"Desktop development with C++\" workload during installation.\n\n:::\n\n## Installing from PyPI\n\nThe recommended way to install multimark is with pip inside a virtual environment.\n\n```bash\npython -m pip install multimark\n```\n\nThis downloads the source distribution, compiles the C extension, and installs the\npackage. The entire process typically takes a few seconds on modern hardware.\n\n## Installing from Source\n\nFor development or to get the latest unreleased changes, clone the repository and\ninstall in editable mode.\n\n```bash\ngit clone https://github.com/posit-dev/multimark.git\ncd multimark\npython -m pip install -e \".[dev]\"\n```\n\nEditable mode means changes to the Python source files take effect immediately without\nreinstalling. However, if you modify the C source or the CFFI build script, you need to\nrebuild.\n\n## Verifying the Installation\n\nAfter installing, confirm that the package loads correctly and reports the expected\nlibrary version.\n\n::: {#c8c4c06d .cell execution_count=1}\n``` {.python .cell-code}\nimport multimark\n\nmultimark.cmark_version()\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n'0.29.0.gfm.13'\n```\n:::\n:::\n\n\nIf this prints a version string like `0.29.0.gfm.13`, the C library was compiled and\nlinked successfully.\n\n## Dependencies\n\nMultimark has a single runtime dependency: [cffi](https://cffi.readthedocs.io/). The\nbuild process also requires `cffi` (for generating the bindings) and a C compiler.\nThere are no other third-party dependencies at runtime, keeping the installation\nlightweight and conflict-free.\n\n",
|
|
6
|
+
"supporting": [
|
|
7
|
+
"installation_files"
|
|
8
|
+
],
|
|
9
|
+
"filters": [],
|
|
10
|
+
"includes": {}
|
|
11
|
+
}
|
|
12
|
+
}
|