mdhtml 0.1.45__tar.gz → 0.1.48__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.
- {mdhtml-0.1.45 → mdhtml-0.1.48}/.github/workflows/ci.yml +28 -5
- {mdhtml-0.1.45 → mdhtml-0.1.48}/.gitignore +2 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/Cargo.lock +12 -26
- {mdhtml-0.1.45 → mdhtml-0.1.48}/Cargo.toml +1 -4
- {mdhtml-0.1.45 → mdhtml-0.1.48}/DEV.md +2 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/PKG-INFO +3 -1
- {mdhtml-0.1.45 → mdhtml-0.1.48}/README.md +2 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/docs/sample.html +35 -7
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/README.md +1 -1
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/sample-clean.md +33 -17
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/sample-render.md +48 -17
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/sample.md +26 -8
- mdhtml-0.1.48/lite/LICENSE +201 -0
- mdhtml-0.1.48/lite/README.md +55 -0
- mdhtml-0.1.48/lite/demo/activity.js +30 -0
- mdhtml-0.1.48/lite/demo.html +78 -0
- mdhtml-0.1.48/lite/dialect-mini.md +63 -0
- mdhtml-0.1.48/lite/index.d.ts +30 -0
- mdhtml-0.1.48/lite/index.js +81 -0
- mdhtml-0.1.48/lite/inline.js +191 -0
- mdhtml-0.1.48/lite/package.json +43 -0
- mdhtml-0.1.48/lite/parse.js +213 -0
- mdhtml-0.1.48/lite/scripts/dev.js +13 -0
- mdhtml-0.1.48/lite/test/fixtures.js +26 -0
- mdhtml-0.1.48/lite/test/parser.test.js +171 -0
- mdhtml-0.1.48/package-lock.json +291 -0
- mdhtml-0.1.48/package.json +4 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/tools.py +5 -5
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/block.rs +36 -26
- mdhtml-0.1.48/src/entity.rs +145 -0
- mdhtml-0.1.48/src/entity_table.bin +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/export_html.rs +4 -6
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/inline.rs +44 -2
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/lib.rs +3 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/render.rs +6 -4
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/resolve.rs +1 -1
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/write_md.rs +16 -4
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/wasm.mjs +7 -0
- mdhtml-0.1.45/src/entity.rs +0 -64
- {mdhtml-0.1.45 → mdhtml-0.1.48}/.cargo/config.toml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/.nojekyll +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/CHANGELOG.md +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/LICENSE +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/_config.yml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/_layouts/default.html +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/docs/DIALECT.md +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/docs/puppy.jpg +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/demo.md +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/examples.ipynb +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/filldemo.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo-bound.docx +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo-filled.md +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo-filled.pdf +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo-form.docx +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo-render.md +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo.docx +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo.html +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo.ipynb +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo.md +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo.pdf +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/legal_demo.typ +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/nbsample.ipynb +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/puppy.jpg +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/render_demo.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/sample.css +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/examples/sample.js +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/py/Cargo.toml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/py/build.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/py/src/lib.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/pyproject.toml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/__init__.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/__main__.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/_cli.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/chunk.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/controls.html +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/export.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/fill.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/md.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/md2html.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/mustache.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/page.css +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/readme.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/typst.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/view.css +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/view.js +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/viewmd.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/python/mdhtml/wrap.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/rustfmt.toml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/ast.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/attrs.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/chunk.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/diagnostic.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/frontmatter.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/highlight.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/html.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/import.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/inline_spans.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/line.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/markdown.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/preview.css +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/scan.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/template.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/tmpl.css +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/wikitext.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/src/wrap.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/canonical.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/fixtures/dialect.html +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/fixtures/dialect.md +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/helpers.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/resolve.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/cmark-gfm/README.md +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/cmark-gfm/extensions.txt +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/cmark-gfm/spec.txt +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/kramdown.txt +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/markdowntests.md +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/mf.txt +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/pandoc-grid-tables.txt +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Abbr.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Abbr.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Backtick Fenced Code Blocks Special Cases.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Backtick Fenced Code Blocks Special Cases.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Backtick Fenced Code Blocks.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Backtick Fenced Code Blocks.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Definition Lists.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Definition Lists.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Emphasis.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Emphasis.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Footnotes.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Footnotes.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Headers with attributes.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Headers with attributes.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Inline HTML with Markdown content.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Inline HTML with Markdown content.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Link & Image Attributes.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Link & Image Attributes.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Tables.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Tables.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Tilde Fenced Code Blocks Special Cases.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Tilde Fenced Code Blocks Special Cases.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Tilde Fenced Code Blocks.text +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/source/php-markdown-extra.mdtest/Tilde Fenced Code Blocks.xhtml +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_bibliography.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_chunk.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_conformance.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_export.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_fill.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_focused.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_pathological.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_python.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_readme.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_typst.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/test_wrap.py +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/wikitext.rs +0 -0
- {mdhtml-0.1.45 → mdhtml-0.1.48}/tests/wrap.rs +0 -0
|
@@ -7,6 +7,19 @@ on:
|
|
|
7
7
|
pull_request:
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
|
+
lite:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v7
|
|
14
|
+
- uses: actions/setup-node@v7
|
|
15
|
+
with:
|
|
16
|
+
node-version: lts/*
|
|
17
|
+
cache: npm
|
|
18
|
+
cache-dependency-path: package-lock.json
|
|
19
|
+
- run: npm ci
|
|
20
|
+
- run: npm test --workspace mdhtml-lite
|
|
21
|
+
- run: npm pack --workspace mdhtml-lite --dry-run
|
|
22
|
+
|
|
10
23
|
test:
|
|
11
24
|
runs-on: ubuntu-latest
|
|
12
25
|
steps:
|
|
@@ -30,6 +43,7 @@ jobs:
|
|
|
30
43
|
targets: wasm32-unknown-unknown
|
|
31
44
|
- run: cargo generate-lockfile
|
|
32
45
|
- uses: Swatinem/rust-cache@v2
|
|
46
|
+
- run: sudo apt-get update && sudo apt-get install -y binaryen
|
|
33
47
|
- run: cargo wasm --profile wasm
|
|
34
48
|
- run: node --test tests/wasm.mjs
|
|
35
49
|
# The `npm` job publishes this package on a `v*` tag.
|
|
@@ -108,13 +122,20 @@ jobs:
|
|
|
108
122
|
|
|
109
123
|
npm:
|
|
110
124
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
111
|
-
needs: [test, wasm]
|
|
125
|
+
needs: [test, wasm, lite]
|
|
112
126
|
runs-on: ubuntu-latest
|
|
113
|
-
|
|
127
|
+
strategy:
|
|
128
|
+
fail-fast: false
|
|
129
|
+
matrix:
|
|
130
|
+
directory: [wasm/pkg, lite]
|
|
131
|
+
# Both npm packages trust this workflow and share the Cargo release version.
|
|
114
132
|
permissions:
|
|
133
|
+
contents: read
|
|
115
134
|
id-token: write
|
|
116
135
|
steps:
|
|
117
|
-
- uses: actions/
|
|
136
|
+
- uses: actions/checkout@v7
|
|
137
|
+
- if: matrix.directory == 'wasm/pkg'
|
|
138
|
+
uses: actions/download-artifact@v8
|
|
118
139
|
with:
|
|
119
140
|
name: wasm-pkg
|
|
120
141
|
path: wasm/pkg
|
|
@@ -122,5 +143,7 @@ jobs:
|
|
|
122
143
|
with:
|
|
123
144
|
node-version: lts/*
|
|
124
145
|
registry-url: https://registry.npmjs.org
|
|
125
|
-
- run:
|
|
126
|
-
|
|
146
|
+
- run: |
|
|
147
|
+
npm pkg set version="${GITHUB_REF_NAME#v}"
|
|
148
|
+
npm publish --access public --ignore-scripts
|
|
149
|
+
working-directory: ${{ matrix.directory }}
|
|
@@ -65,12 +65,6 @@ version = "0.5.0"
|
|
|
65
65
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
66
66
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
67
67
|
|
|
68
|
-
[[package]]
|
|
69
|
-
name = "html-escape"
|
|
70
|
-
version = "0.3.0"
|
|
71
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
72
|
-
checksum = "491194d601b4fa9fac3c9571e014070a0ad1bc3392d1bc10419695196a8b3cc3"
|
|
73
|
-
|
|
74
68
|
[[package]]
|
|
75
69
|
name = "html5ever"
|
|
76
70
|
version = "0.39.0"
|
|
@@ -93,9 +87,9 @@ dependencies = [
|
|
|
93
87
|
|
|
94
88
|
[[package]]
|
|
95
89
|
name = "itoa"
|
|
96
|
-
version = "1.0.
|
|
90
|
+
version = "1.0.19"
|
|
97
91
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
98
|
-
checksum = "
|
|
92
|
+
checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4"
|
|
99
93
|
|
|
100
94
|
[[package]]
|
|
101
95
|
name = "libc"
|
|
@@ -131,17 +125,15 @@ dependencies = [
|
|
|
131
125
|
|
|
132
126
|
[[package]]
|
|
133
127
|
name = "mdhtml-crate"
|
|
134
|
-
version = "0.1.
|
|
128
|
+
version = "0.1.48"
|
|
135
129
|
dependencies = [
|
|
136
130
|
"base64",
|
|
137
131
|
"fast5ever",
|
|
138
|
-
"html-escape",
|
|
139
|
-
"unicode-properties",
|
|
140
132
|
]
|
|
141
133
|
|
|
142
134
|
[[package]]
|
|
143
135
|
name = "mdhtml-py"
|
|
144
|
-
version = "0.1.
|
|
136
|
+
version = "0.1.48"
|
|
145
137
|
dependencies = [
|
|
146
138
|
"mdhtml-crate",
|
|
147
139
|
"pyo3",
|
|
@@ -150,7 +142,7 @@ dependencies = [
|
|
|
150
142
|
|
|
151
143
|
[[package]]
|
|
152
144
|
name = "mdhtml-wasm"
|
|
153
|
-
version = "0.1.
|
|
145
|
+
version = "0.1.48"
|
|
154
146
|
dependencies = [
|
|
155
147
|
"mdhtml-crate",
|
|
156
148
|
]
|
|
@@ -398,9 +390,9 @@ checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256"
|
|
|
398
390
|
|
|
399
391
|
[[package]]
|
|
400
392
|
name = "smallvec"
|
|
401
|
-
version = "1.16.
|
|
393
|
+
version = "1.16.6"
|
|
402
394
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
403
|
-
checksum = "
|
|
395
|
+
checksum = "3244542535d5de959d90ec55d1b5ff0fd2bb7b1310223907d5f11932847f7b59"
|
|
404
396
|
|
|
405
397
|
[[package]]
|
|
406
398
|
name = "string_cache"
|
|
@@ -428,9 +420,9 @@ dependencies = [
|
|
|
428
420
|
|
|
429
421
|
[[package]]
|
|
430
422
|
name = "syn"
|
|
431
|
-
version = "3.0.
|
|
423
|
+
version = "3.0.10"
|
|
432
424
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
433
|
-
checksum = "
|
|
425
|
+
checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
|
|
434
426
|
dependencies = [
|
|
435
427
|
"proc-macro2",
|
|
436
428
|
"quote",
|
|
@@ -439,9 +431,9 @@ dependencies = [
|
|
|
439
431
|
|
|
440
432
|
[[package]]
|
|
441
433
|
name = "target-lexicon"
|
|
442
|
-
version = "0.13.
|
|
434
|
+
version = "0.13.6"
|
|
443
435
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
444
|
-
checksum = "
|
|
436
|
+
checksum = "8c447be3a2abfa84b2d91680c56600bd6b2873866de27b36ec911be705e291da"
|
|
445
437
|
|
|
446
438
|
[[package]]
|
|
447
439
|
name = "tendril"
|
|
@@ -497,12 +489,6 @@ version = "1.0.27"
|
|
|
497
489
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
498
490
|
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
|
499
491
|
|
|
500
|
-
[[package]]
|
|
501
|
-
name = "unicode-properties"
|
|
502
|
-
version = "0.1.5"
|
|
503
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
504
|
-
checksum = "993ad287eb20e8ba755312801cfe1413e0f25d604075863acaddca10b04c1833"
|
|
505
|
-
|
|
506
492
|
[[package]]
|
|
507
493
|
name = "web_atoms"
|
|
508
494
|
version = "0.2.6"
|
|
@@ -529,7 +515,7 @@ checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef"
|
|
|
529
515
|
|
|
530
516
|
[[package]]
|
|
531
517
|
name = "xtask"
|
|
532
|
-
version = "0.1.
|
|
518
|
+
version = "0.1.48"
|
|
533
519
|
dependencies = [
|
|
534
520
|
"anyhow",
|
|
535
521
|
"serde_json",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
members = ["py"]
|
|
3
3
|
|
|
4
4
|
[workspace.package]
|
|
5
|
-
version = "0.1.
|
|
5
|
+
version = "0.1.48"
|
|
6
6
|
edition = "2024"
|
|
7
7
|
rust-version = "1.91"
|
|
8
8
|
license = "Apache-2.0"
|
|
@@ -19,7 +19,6 @@ rust-version.workspace = true
|
|
|
19
19
|
license.workspace = true
|
|
20
20
|
description = "A bounded-time, Pandoc-leaning Markdown parser with GFM, Extra/kramdown, math, fenced divs, and MDHTML output."
|
|
21
21
|
repository.workspace = true
|
|
22
|
-
homepage = "https://github.com/AnswerDotAI/mdhtml"
|
|
23
22
|
documentation = "https://github.com/AnswerDotAI/mdhtml"
|
|
24
23
|
keywords = ["markdown", "parser", "html", "commonmark", "gfm"]
|
|
25
24
|
categories = ["parser-implementations", "text-processing"]
|
|
@@ -65,8 +64,6 @@ dom = ["dep:fast5ever"]
|
|
|
65
64
|
[dependencies]
|
|
66
65
|
base64 = ">=0.23"
|
|
67
66
|
fast5ever = { version = ">=0.1.5", optional = true }
|
|
68
|
-
html-escape = ">=0.2"
|
|
69
|
-
unicode-properties = ">=0.1"
|
|
70
67
|
|
|
71
68
|
[lints]
|
|
72
69
|
workspace = true
|
|
@@ -21,6 +21,8 @@ The `release` profile is optimized and incremental for fast local iteration. CI
|
|
|
21
21
|
|
|
22
22
|
## Testing
|
|
23
23
|
|
|
24
|
+
The independent `mdhtml-lite` npm package lives in `lite/`. Run `npm install` there once, then `npm test` or `npm run test:watch`; no Python or Rust build is needed. `npm run dev` serves its streaming/tool-wrapping demo. The tests curate cases from the existing mdhtml fixtures, and `npm pack --dry-run` checks the published file set. See `lite/dialect-mini.md` for its preview contract.
|
|
25
|
+
|
|
24
26
|
```bash
|
|
25
27
|
cargo fastfmt
|
|
26
28
|
cargo check --workspace
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mdhtml
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.48
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Requires-Dist: fast5ever>=0.1.5
|
|
@@ -90,6 +90,8 @@ Write attributes for raw HTML blocks in the HTML itself. `md` attribute lists do
|
|
|
90
90
|
|
|
91
91
|
## Usage
|
|
92
92
|
|
|
93
|
+
For client-side previews of streaming LLM output, [mdhtml-lite](lite/README.md) provides a small JavaScript parser without WASM. Its [preview dialect](lite/dialect-mini.md) covers basic `md`; applications replace the preview with full mdhtml output when streaming finishes.
|
|
94
|
+
|
|
93
95
|
Install via pip to get both the Python API and the `md2mdhtml` CLI:
|
|
94
96
|
|
|
95
97
|
```bash
|
|
@@ -58,6 +58,8 @@ Write attributes for raw HTML blocks in the HTML itself. `md` attribute lists do
|
|
|
58
58
|
|
|
59
59
|
## Usage
|
|
60
60
|
|
|
61
|
+
For client-side previews of streaming LLM output, [mdhtml-lite](lite/README.md) provides a small JavaScript parser without WASM. Its [preview dialect](lite/dialect-mini.md) covers basic `md`; applications replace the preview with full mdhtml output when streaming finishes.
|
|
62
|
+
|
|
61
63
|
Install via pip to get both the Python API and the `md2mdhtml` CLI:
|
|
62
64
|
|
|
63
65
|
```bash
|
|
@@ -362,7 +362,7 @@ GitHub-specific Markdown is inserted only in GFM output.
|
|
|
362
362
|
</code></pre>
|
|
363
363
|
<p>A quick aside.<sup id="fnref-__note1"><a href="#fn-__note1" class="footnote-ref" role="doc-noteref">2</a></sup></p>
|
|
364
364
|
<h2>Template tokens and filling</h2>
|
|
365
|
-
<p>Mustache-spelled tokens are recognized when a <code>templates=</code> configuration is passed (<code>viewmd</code> and <code>md2html</code> pass one by default) and render as inert pills
|
|
365
|
+
<p>Mustache-spelled tokens are recognized when a <code>templates=</code> configuration is passed (<code>viewmd</code> and <code>md2html</code> pass one by default) and render as inert pills without filling. <code>fillmd</code> fills them from the document's <code>formdata:</code>. Sample generation fills the live examples below and leaves their source fences unchanged. A variable substitutes text in place; a range's behavior is decided by its value's type: falsy drops it, a dict keeps it once as a scope, a list repeats it per item, and <code>{{^</code> keeps only on falsy:</p>
|
|
366
366
|
<pre><code class="language-markdown">Prepared for {{client}}.
|
|
367
367
|
|
|
368
368
|
{{#office}}
|
|
@@ -379,19 +379,47 @@ The {{name}} office ({{city}}) handles this matter.
|
|
|
379
379
|
Standard processing applies.
|
|
380
380
|
{{/rush}}
|
|
381
381
|
</code></pre>
|
|
382
|
-
<p>Prepared for
|
|
383
|
-
<p>
|
|
382
|
+
<p>Prepared for Riverbank Ltd.</p>
|
|
383
|
+
<p>The North office (Leeds) handles this matter.</p>
|
|
384
384
|
<table>
|
|
385
385
|
<thead>
|
|
386
386
|
<tr><th>Item</th><th>Qty</th></tr>
|
|
387
387
|
</thead>
|
|
388
388
|
<tbody>
|
|
389
|
-
<tr><td>
|
|
390
|
-
<tr><td>
|
|
391
|
-
<tr><td>{{/items}}</td><td></td></tr>
|
|
389
|
+
<tr><td>Widget</td><td>12</td></tr>
|
|
390
|
+
<tr><td>Sprocket</td><td>3</td></tr>
|
|
392
391
|
</tbody>
|
|
393
392
|
</table>
|
|
394
|
-
<p>
|
|
393
|
+
<p>Standard processing applies.</p>
|
|
394
|
+
<p>Nested sections scope each person's name within their department. The skills are a list of strings, addressed with <code>{{.}}</code>:</p>
|
|
395
|
+
<pre><code class="language-markdown">{{#departments}}
|
|
396
|
+
### {{name}}
|
|
397
|
+
|
|
398
|
+
{{#people}}
|
|
399
|
+
**{{name}}**
|
|
400
|
+
|
|
401
|
+
{{#skills}}
|
|
402
|
+
- {{.}}
|
|
403
|
+
{{/skills}}
|
|
404
|
+
|
|
405
|
+
{{/people}}
|
|
406
|
+
{{/departments}}
|
|
407
|
+
</code></pre>
|
|
408
|
+
<h3>Research</h3>
|
|
409
|
+
<p><strong>Ada</strong></p>
|
|
410
|
+
<ul>
|
|
411
|
+
<li>Rust</li>
|
|
412
|
+
<li>Python</li>
|
|
413
|
+
</ul>
|
|
414
|
+
<p><strong>Lin</strong></p>
|
|
415
|
+
<ul>
|
|
416
|
+
<li>Typst</li>
|
|
417
|
+
</ul>
|
|
418
|
+
<h3>Operations</h3>
|
|
419
|
+
<p><strong>Sam</strong></p>
|
|
420
|
+
<ul>
|
|
421
|
+
<li>SQL</li>
|
|
422
|
+
</ul>
|
|
395
423
|
<section class="footnotes" role="doc-endnotes">
|
|
396
424
|
<ol>
|
|
397
425
|
<li id="fn-sample-note">
|
|
@@ -50,7 +50,7 @@ space, and ordinary text keeps flowing after the table.
|
|
|
50
50
|
## The other files
|
|
51
51
|
|
|
52
52
|
- `sample.md` - the feature sample: one section per dialect feature, each giving its Markdown
|
|
53
|
-
source once, fenced. `mdhtml.tools.sample_md()` expands each fence with a copy of its body
|
|
53
|
+
source once, fenced. `mdhtml.tools.sample_md()` expands each fence with a filled copy of its body
|
|
54
54
|
unfenced, so the tour shows source and rendering without repeating either. `sample-render.md`
|
|
55
55
|
is that expanded document, `sample-clean.md` the same with each fence *replaced* by its body
|
|
56
56
|
(a plain demo document, `mdhtml.tools.sample_clean()`), `puppy.jpg` the image they use, and
|
|
@@ -11,6 +11,14 @@ formdata:
|
|
|
11
11
|
- {name: Widget, qty: "12"}
|
|
12
12
|
- {name: Sprocket, qty: "3"}
|
|
13
13
|
rush: ""
|
|
14
|
+
departments:
|
|
15
|
+
- name: Research
|
|
16
|
+
people:
|
|
17
|
+
- {name: Ada, skills: [Rust, Python]}
|
|
18
|
+
- {name: Lin, skills: [Typst]}
|
|
19
|
+
- name: Operations
|
|
20
|
+
people:
|
|
21
|
+
- {name: Sam, skills: [SQL]}
|
|
14
22
|
---
|
|
15
23
|
|
|
16
24
|
# mdhtml feature sample
|
|
@@ -290,27 +298,35 @@ A quick aside.^[Inline footnotes hold arbitrary *inline* Markdown.]
|
|
|
290
298
|
|
|
291
299
|
## Template tokens and filling
|
|
292
300
|
|
|
293
|
-
Mustache-spelled tokens are recognized when a `templates=` configuration is passed
|
|
294
|
-
(`viewmd` and `md2html` pass one by default) and render as inert pills, so a template
|
|
295
|
-
previews without running. `fillmd` fills them, gathering defaults from the document's
|
|
296
|
-
own `formdata:` frontmatter — this page's frontmatter supplies every field below, so
|
|
297
|
-
`fillmd examples/sample-clean.md` (the generated plain register, where the example is
|
|
298
|
-
live rather than fenced) completes this section. A var substitutes text in place;
|
|
299
|
-
a range's behavior is decided by its value's *type*: falsy drops it, a dict keeps it
|
|
300
|
-
once as a scope, a list repeats it per item, and `{{^` keeps only on falsy:
|
|
301
|
+
Mustache-spelled tokens are recognized when a `templates=` configuration is passed (`viewmd` and `md2html` pass one by default) and render as inert pills without filling. `fillmd` fills them from the document's `formdata:`. Sample generation fills the live examples below and leaves their source fences unchanged. A variable substitutes text in place; a range's behavior is decided by its value's type: falsy drops it, a dict keeps it once as a scope, a list repeats it per item, and `{{^` keeps only on falsy:
|
|
301
302
|
|
|
302
|
-
Prepared for
|
|
303
|
+
Prepared for Riverbank Ltd.
|
|
303
304
|
|
|
304
|
-
|
|
305
|
-
The {{name}} office ({{city}}) handles this matter.
|
|
306
|
-
{{/office}}
|
|
305
|
+
The North office (Leeds) handles this matter.
|
|
307
306
|
|
|
308
307
|
| Item | Qty |
|
|
309
308
|
|------|------|
|
|
310
|
-
|
|
311
|
-
|
|
|
312
|
-
{{/items}}
|
|
309
|
+
| Widget | 12 |
|
|
310
|
+
| Sprocket | 3 |
|
|
313
311
|
|
|
314
|
-
{{^rush}}
|
|
315
312
|
Standard processing applies.
|
|
316
|
-
|
|
313
|
+
|
|
314
|
+
Nested sections scope each person's name within their department. The skills are a list of strings, addressed with `{{.}}`:
|
|
315
|
+
|
|
316
|
+
### Research
|
|
317
|
+
|
|
318
|
+
**Ada**
|
|
319
|
+
|
|
320
|
+
- Rust
|
|
321
|
+
- Python
|
|
322
|
+
|
|
323
|
+
**Lin**
|
|
324
|
+
|
|
325
|
+
- Typst
|
|
326
|
+
|
|
327
|
+
### Operations
|
|
328
|
+
|
|
329
|
+
**Sam**
|
|
330
|
+
|
|
331
|
+
- SQL
|
|
332
|
+
|
|
@@ -11,6 +11,14 @@ formdata:
|
|
|
11
11
|
- {name: Widget, qty: "12"}
|
|
12
12
|
- {name: Sprocket, qty: "3"}
|
|
13
13
|
rush: ""
|
|
14
|
+
departments:
|
|
15
|
+
- name: Research
|
|
16
|
+
people:
|
|
17
|
+
- {name: Ada, skills: [Rust, Python]}
|
|
18
|
+
- {name: Lin, skills: [Typst]}
|
|
19
|
+
- name: Operations
|
|
20
|
+
people:
|
|
21
|
+
- {name: Sam, skills: [SQL]}
|
|
14
22
|
---
|
|
15
23
|
|
|
16
24
|
# mdhtml feature sample
|
|
@@ -527,14 +535,7 @@ A quick aside.^[Inline footnotes hold arbitrary *inline* Markdown.]
|
|
|
527
535
|
|
|
528
536
|
## Template tokens and filling
|
|
529
537
|
|
|
530
|
-
Mustache-spelled tokens are recognized when a `templates=` configuration is passed
|
|
531
|
-
(`viewmd` and `md2html` pass one by default) and render as inert pills, so a template
|
|
532
|
-
previews without running. `fillmd` fills them, gathering defaults from the document's
|
|
533
|
-
own `formdata:` frontmatter — this page's frontmatter supplies every field below, so
|
|
534
|
-
`fillmd examples/sample-clean.md` (the generated plain register, where the example is
|
|
535
|
-
live rather than fenced) completes this section. A var substitutes text in place;
|
|
536
|
-
a range's behavior is decided by its value's *type*: falsy drops it, a dict keeps it
|
|
537
|
-
once as a scope, a list repeats it per item, and `{{^` keeps only on falsy:
|
|
538
|
+
Mustache-spelled tokens are recognized when a `templates=` configuration is passed (`viewmd` and `md2html` pass one by default) and render as inert pills without filling. `fillmd` fills them from the document's `formdata:`. Sample generation fills the live examples below and leaves their source fences unchanged. A variable substitutes text in place; a range's behavior is decided by its value's type: falsy drops it, a dict keeps it once as a scope, a list repeats it per item, and `{{^` keeps only on falsy:
|
|
538
539
|
|
|
539
540
|
`````markdown
|
|
540
541
|
Prepared for {{client}}.
|
|
@@ -554,18 +555,48 @@ Standard processing applies.
|
|
|
554
555
|
{{/rush}}
|
|
555
556
|
`````
|
|
556
557
|
|
|
557
|
-
Prepared for
|
|
558
|
+
Prepared for Riverbank Ltd.
|
|
558
559
|
|
|
559
|
-
|
|
560
|
-
The {{name}} office ({{city}}) handles this matter.
|
|
561
|
-
{{/office}}
|
|
560
|
+
The North office (Leeds) handles this matter.
|
|
562
561
|
|
|
563
562
|
| Item | Qty |
|
|
564
563
|
|------|------|
|
|
565
|
-
|
|
566
|
-
|
|
|
567
|
-
{{/items}}
|
|
564
|
+
| Widget | 12 |
|
|
565
|
+
| Sprocket | 3 |
|
|
568
566
|
|
|
569
|
-
{{^rush}}
|
|
570
567
|
Standard processing applies.
|
|
571
|
-
|
|
568
|
+
|
|
569
|
+
Nested sections scope each person's name within their department. The skills are a list of strings, addressed with `{{.}}`:
|
|
570
|
+
|
|
571
|
+
`````markdown
|
|
572
|
+
{{#departments}}
|
|
573
|
+
### {{name}}
|
|
574
|
+
|
|
575
|
+
{{#people}}
|
|
576
|
+
**{{name}}**
|
|
577
|
+
|
|
578
|
+
{{#skills}}
|
|
579
|
+
- {{.}}
|
|
580
|
+
{{/skills}}
|
|
581
|
+
|
|
582
|
+
{{/people}}
|
|
583
|
+
{{/departments}}
|
|
584
|
+
`````
|
|
585
|
+
|
|
586
|
+
### Research
|
|
587
|
+
|
|
588
|
+
**Ada**
|
|
589
|
+
|
|
590
|
+
- Rust
|
|
591
|
+
- Python
|
|
592
|
+
|
|
593
|
+
**Lin**
|
|
594
|
+
|
|
595
|
+
- Typst
|
|
596
|
+
|
|
597
|
+
### Operations
|
|
598
|
+
|
|
599
|
+
**Sam**
|
|
600
|
+
|
|
601
|
+
- SQL
|
|
602
|
+
|
|
@@ -11,6 +11,14 @@ formdata:
|
|
|
11
11
|
- {name: Widget, qty: "12"}
|
|
12
12
|
- {name: Sprocket, qty: "3"}
|
|
13
13
|
rush: ""
|
|
14
|
+
departments:
|
|
15
|
+
- name: Research
|
|
16
|
+
people:
|
|
17
|
+
- {name: Ada, skills: [Rust, Python]}
|
|
18
|
+
- {name: Lin, skills: [Typst]}
|
|
19
|
+
- name: Operations
|
|
20
|
+
people:
|
|
21
|
+
- {name: Sam, skills: [SQL]}
|
|
14
22
|
---
|
|
15
23
|
|
|
16
24
|
# mdhtml feature sample
|
|
@@ -338,14 +346,7 @@ A quick aside.^[Inline footnotes hold arbitrary *inline* Markdown.]
|
|
|
338
346
|
|
|
339
347
|
## Template tokens and filling
|
|
340
348
|
|
|
341
|
-
Mustache-spelled tokens are recognized when a `templates=` configuration is passed
|
|
342
|
-
(`viewmd` and `md2html` pass one by default) and render as inert pills, so a template
|
|
343
|
-
previews without running. `fillmd` fills them, gathering defaults from the document's
|
|
344
|
-
own `formdata:` frontmatter — this page's frontmatter supplies every field below, so
|
|
345
|
-
`fillmd examples/sample-clean.md` (the generated plain register, where the example is
|
|
346
|
-
live rather than fenced) completes this section. A var substitutes text in place;
|
|
347
|
-
a range's behavior is decided by its value's *type*: falsy drops it, a dict keeps it
|
|
348
|
-
once as a scope, a list repeats it per item, and `{{^` keeps only on falsy:
|
|
349
|
+
Mustache-spelled tokens are recognized when a `templates=` configuration is passed (`viewmd` and `md2html` pass one by default) and render as inert pills without filling. `fillmd` fills them from the document's `formdata:`. Sample generation fills the live examples below and leaves their source fences unchanged. A variable substitutes text in place; a range's behavior is decided by its value's type: falsy drops it, a dict keeps it once as a scope, a list repeats it per item, and `{{^` keeps only on falsy:
|
|
349
350
|
|
|
350
351
|
`````markdown
|
|
351
352
|
Prepared for {{client}}.
|
|
@@ -364,3 +365,20 @@ The {{name}} office ({{city}}) handles this matter.
|
|
|
364
365
|
Standard processing applies.
|
|
365
366
|
{{/rush}}
|
|
366
367
|
`````
|
|
368
|
+
|
|
369
|
+
Nested sections scope each person's name within their department. The skills are a list of strings, addressed with `{{.}}`:
|
|
370
|
+
|
|
371
|
+
`````markdown
|
|
372
|
+
{{#departments}}
|
|
373
|
+
### {{name}}
|
|
374
|
+
|
|
375
|
+
{{#people}}
|
|
376
|
+
**{{name}}**
|
|
377
|
+
|
|
378
|
+
{{#skills}}
|
|
379
|
+
- {{.}}
|
|
380
|
+
{{/skills}}
|
|
381
|
+
|
|
382
|
+
{{/people}}
|
|
383
|
+
{{/departments}}
|
|
384
|
+
`````
|