mdhtml 0.1.44__tar.gz → 0.1.47__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.44 → mdhtml-0.1.47}/.github/workflows/ci.yml +30 -5
- {mdhtml-0.1.44 → mdhtml-0.1.47}/.gitignore +2 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/Cargo.lock +28 -28
- {mdhtml-0.1.44 → mdhtml-0.1.47}/Cargo.toml +1 -1
- {mdhtml-0.1.44 → mdhtml-0.1.47}/DEV.md +2 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/PKG-INFO +9 -4
- {mdhtml-0.1.44 → mdhtml-0.1.47}/README.md +7 -2
- {mdhtml-0.1.44 → mdhtml-0.1.47}/docs/sample.html +35 -7
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/README.md +1 -1
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/sample-clean.md +33 -17
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/sample-render.md +48 -17
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/sample.md +26 -8
- mdhtml-0.1.47/lite/LICENSE +201 -0
- mdhtml-0.1.47/lite/README.md +53 -0
- mdhtml-0.1.47/lite/demo/activity.js +30 -0
- mdhtml-0.1.47/lite/demo.html +78 -0
- mdhtml-0.1.47/lite/dialect-mini.md +63 -0
- mdhtml-0.1.47/lite/index.d.ts +30 -0
- mdhtml-0.1.47/lite/index.js +81 -0
- mdhtml-0.1.47/lite/inline.js +191 -0
- mdhtml-0.1.47/lite/package-lock.json +323 -0
- mdhtml-0.1.47/lite/package.json +43 -0
- mdhtml-0.1.47/lite/parse.js +213 -0
- mdhtml-0.1.47/lite/scripts/dev.js +13 -0
- mdhtml-0.1.47/lite/test/fixtures.js +26 -0
- mdhtml-0.1.47/lite/test/parser.test.js +171 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/py/src/lib.rs +51 -54
- {mdhtml-0.1.44 → mdhtml-0.1.47}/pyproject.toml +1 -1
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/tools.py +5 -5
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/viewmd.py +7 -3
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/block.rs +25 -22
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/chunk.rs +3 -2
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/export_html.rs +5 -3
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/frontmatter.rs +2 -1
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/import.rs +4 -3
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/inline.rs +21 -19
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/inline_spans.rs +3 -2
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/markdown.rs +6 -5
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/render.rs +5 -6
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/resolve.rs +16 -11
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/wikitext.rs +5 -4
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/wrap.rs +3 -4
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/write_md.rs +8 -5
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_export.py +3 -3
- {mdhtml-0.1.44 → mdhtml-0.1.47}/.cargo/config.toml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/.nojekyll +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/CHANGELOG.md +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/LICENSE +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/_config.yml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/_layouts/default.html +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/docs/DIALECT.md +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/docs/puppy.jpg +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/demo.md +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/examples.ipynb +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/filldemo.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo-bound.docx +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo-filled.md +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo-filled.pdf +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo-form.docx +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo-render.md +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo.docx +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo.html +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo.ipynb +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo.md +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo.pdf +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/legal_demo.typ +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/nbsample.ipynb +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/puppy.jpg +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/render_demo.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/sample.css +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/examples/sample.js +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/py/Cargo.toml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/py/build.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/__init__.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/__main__.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/_cli.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/chunk.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/controls.html +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/export.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/fill.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/md.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/md2html.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/mustache.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/page.css +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/readme.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/typst.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/view.css +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/view.js +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/python/mdhtml/wrap.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/rustfmt.toml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/ast.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/attrs.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/diagnostic.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/entity.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/highlight.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/html.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/lib.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/line.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/preview.css +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/scan.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/template.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/src/tmpl.css +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/canonical.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/fixtures/dialect.html +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/fixtures/dialect.md +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/helpers.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/resolve.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/cmark-gfm/README.md +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/cmark-gfm/extensions.txt +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/cmark-gfm/spec.txt +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/kramdown.txt +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/markdowntests.md +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/mf.txt +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/pandoc-grid-tables.txt +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Abbr.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Abbr.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Backtick Fenced Code Blocks Special Cases.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Backtick Fenced Code Blocks Special Cases.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Backtick Fenced Code Blocks.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Backtick Fenced Code Blocks.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Definition Lists.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Definition Lists.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Emphasis.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Emphasis.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Footnotes.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Footnotes.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Headers with attributes.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Headers with attributes.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Inline HTML with Markdown content.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Inline HTML with Markdown content.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Link & Image Attributes.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Link & Image Attributes.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Tables.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Tables.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Tilde Fenced Code Blocks Special Cases.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Tilde Fenced Code Blocks Special Cases.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Tilde Fenced Code Blocks.text +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/source/php-markdown-extra.mdtest/Tilde Fenced Code Blocks.xhtml +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_bibliography.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_chunk.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_conformance.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_fill.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_focused.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_pathological.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_python.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_readme.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_typst.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/test_wrap.py +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/wasm.mjs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/wikitext.rs +0 -0
- {mdhtml-0.1.44 → mdhtml-0.1.47}/tests/wrap.rs +0 -0
|
@@ -7,6 +7,22 @@ on:
|
|
|
7
7
|
pull_request:
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
|
+
lite:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
defaults:
|
|
13
|
+
run:
|
|
14
|
+
working-directory: lite
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
|
+
- uses: actions/setup-node@v7
|
|
18
|
+
with:
|
|
19
|
+
node-version: lts/*
|
|
20
|
+
cache: npm
|
|
21
|
+
cache-dependency-path: lite/package-lock.json
|
|
22
|
+
- run: npm ci
|
|
23
|
+
- run: npm test
|
|
24
|
+
- run: npm pack --dry-run
|
|
25
|
+
|
|
10
26
|
test:
|
|
11
27
|
runs-on: ubuntu-latest
|
|
12
28
|
steps:
|
|
@@ -108,13 +124,20 @@ jobs:
|
|
|
108
124
|
|
|
109
125
|
npm:
|
|
110
126
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
111
|
-
needs: [test, wasm]
|
|
127
|
+
needs: [test, wasm, lite]
|
|
112
128
|
runs-on: ubuntu-latest
|
|
113
|
-
|
|
129
|
+
strategy:
|
|
130
|
+
fail-fast: false
|
|
131
|
+
matrix:
|
|
132
|
+
directory: [wasm/pkg, lite]
|
|
133
|
+
# Both npm packages trust this workflow and share the Cargo release version.
|
|
114
134
|
permissions:
|
|
135
|
+
contents: read
|
|
115
136
|
id-token: write
|
|
116
137
|
steps:
|
|
117
|
-
- uses: actions/
|
|
138
|
+
- uses: actions/checkout@v7
|
|
139
|
+
- if: matrix.directory == 'wasm/pkg'
|
|
140
|
+
uses: actions/download-artifact@v8
|
|
118
141
|
with:
|
|
119
142
|
name: wasm-pkg
|
|
120
143
|
path: wasm/pkg
|
|
@@ -122,5 +145,7 @@ jobs:
|
|
|
122
145
|
with:
|
|
123
146
|
node-version: lts/*
|
|
124
147
|
registry-url: https://registry.npmjs.org
|
|
125
|
-
- run:
|
|
126
|
-
|
|
148
|
+
- run: |
|
|
149
|
+
npm pkg set version="${GITHUB_REF_NAME#v}"
|
|
150
|
+
npm publish --access public --ignore-scripts
|
|
151
|
+
working-directory: ${{ matrix.directory }}
|
|
@@ -67,9 +67,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
|
67
67
|
|
|
68
68
|
[[package]]
|
|
69
69
|
name = "html-escape"
|
|
70
|
-
version = "0.3.
|
|
70
|
+
version = "0.3.1"
|
|
71
71
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
72
|
-
checksum = "
|
|
72
|
+
checksum = "d45ed4d99334da2a2f221504e8ffc8ad09baf2a452b154465a976bfde697b004"
|
|
73
73
|
|
|
74
74
|
[[package]]
|
|
75
75
|
name = "html5ever"
|
|
@@ -93,9 +93,9 @@ dependencies = [
|
|
|
93
93
|
|
|
94
94
|
[[package]]
|
|
95
95
|
name = "itoa"
|
|
96
|
-
version = "1.0.
|
|
96
|
+
version = "1.0.19"
|
|
97
97
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
98
|
-
checksum = "
|
|
98
|
+
checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4"
|
|
99
99
|
|
|
100
100
|
[[package]]
|
|
101
101
|
name = "libc"
|
|
@@ -114,9 +114,9 @@ dependencies = [
|
|
|
114
114
|
|
|
115
115
|
[[package]]
|
|
116
116
|
name = "log"
|
|
117
|
-
version = "0.4.
|
|
117
|
+
version = "0.4.35"
|
|
118
118
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
|
-
checksum = "
|
|
119
|
+
checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c"
|
|
120
120
|
|
|
121
121
|
[[package]]
|
|
122
122
|
name = "markup5ever"
|
|
@@ -131,7 +131,7 @@ dependencies = [
|
|
|
131
131
|
|
|
132
132
|
[[package]]
|
|
133
133
|
name = "mdhtml-crate"
|
|
134
|
-
version = "0.1.
|
|
134
|
+
version = "0.1.47"
|
|
135
135
|
dependencies = [
|
|
136
136
|
"base64",
|
|
137
137
|
"fast5ever",
|
|
@@ -141,7 +141,7 @@ dependencies = [
|
|
|
141
141
|
|
|
142
142
|
[[package]]
|
|
143
143
|
name = "mdhtml-py"
|
|
144
|
-
version = "0.1.
|
|
144
|
+
version = "0.1.47"
|
|
145
145
|
dependencies = [
|
|
146
146
|
"mdhtml-crate",
|
|
147
147
|
"pyo3",
|
|
@@ -150,7 +150,7 @@ dependencies = [
|
|
|
150
150
|
|
|
151
151
|
[[package]]
|
|
152
152
|
name = "mdhtml-wasm"
|
|
153
|
-
version = "0.1.
|
|
153
|
+
version = "0.1.47"
|
|
154
154
|
dependencies = [
|
|
155
155
|
"mdhtml-crate",
|
|
156
156
|
]
|
|
@@ -383,9 +383,9 @@ dependencies = [
|
|
|
383
383
|
|
|
384
384
|
[[package]]
|
|
385
385
|
name = "serde_spanned"
|
|
386
|
-
version = "1.1.
|
|
386
|
+
version = "1.1.3"
|
|
387
387
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
388
|
-
checksum = "
|
|
388
|
+
checksum = "9c187e0a369471c550af028cba56d4f4fa2a489ad28151ae95a4d340a2a8b782"
|
|
389
389
|
dependencies = [
|
|
390
390
|
"serde_core",
|
|
391
391
|
]
|
|
@@ -398,9 +398,9 @@ checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256"
|
|
|
398
398
|
|
|
399
399
|
[[package]]
|
|
400
400
|
name = "smallvec"
|
|
401
|
-
version = "1.16.
|
|
401
|
+
version = "1.16.5"
|
|
402
402
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
403
|
-
checksum = "
|
|
403
|
+
checksum = "149309498a5f7334b12ddae0cad8aba81ce785fe91755068867e017cf98fee46"
|
|
404
404
|
|
|
405
405
|
[[package]]
|
|
406
406
|
name = "string_cache"
|
|
@@ -428,9 +428,9 @@ dependencies = [
|
|
|
428
428
|
|
|
429
429
|
[[package]]
|
|
430
430
|
name = "syn"
|
|
431
|
-
version = "3.0.
|
|
431
|
+
version = "3.0.10"
|
|
432
432
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
433
|
-
checksum = "
|
|
433
|
+
checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
|
|
434
434
|
dependencies = [
|
|
435
435
|
"proc-macro2",
|
|
436
436
|
"quote",
|
|
@@ -439,9 +439,9 @@ dependencies = [
|
|
|
439
439
|
|
|
440
440
|
[[package]]
|
|
441
441
|
name = "target-lexicon"
|
|
442
|
-
version = "0.13.
|
|
442
|
+
version = "0.13.6"
|
|
443
443
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
444
|
-
checksum = "
|
|
444
|
+
checksum = "8c447be3a2abfa84b2d91680c56600bd6b2873866de27b36ec911be705e291da"
|
|
445
445
|
|
|
446
446
|
[[package]]
|
|
447
447
|
name = "tendril"
|
|
@@ -454,9 +454,9 @@ dependencies = [
|
|
|
454
454
|
|
|
455
455
|
[[package]]
|
|
456
456
|
name = "toml"
|
|
457
|
-
version = "1.1
|
|
457
|
+
version = "1.2.1+spec-1.1.0"
|
|
458
458
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
459
|
-
checksum = "
|
|
459
|
+
checksum = "d5755c51863cdac711f1956baf8eb9588e060755f7d3c4c979e70ea1e1f32cd7"
|
|
460
460
|
dependencies = [
|
|
461
461
|
"indexmap",
|
|
462
462
|
"serde_core",
|
|
@@ -469,9 +469,9 @@ dependencies = [
|
|
|
469
469
|
|
|
470
470
|
[[package]]
|
|
471
471
|
name = "toml_datetime"
|
|
472
|
-
version = "1.1.
|
|
472
|
+
version = "1.1.3+spec-1.1.0"
|
|
473
473
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
474
|
-
checksum = "
|
|
474
|
+
checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49"
|
|
475
475
|
dependencies = [
|
|
476
476
|
"serde_core",
|
|
477
477
|
]
|
|
@@ -487,9 +487,9 @@ dependencies = [
|
|
|
487
487
|
|
|
488
488
|
[[package]]
|
|
489
489
|
name = "toml_writer"
|
|
490
|
-
version = "1.
|
|
490
|
+
version = "1.2.0+spec-1.1.0"
|
|
491
491
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
492
|
-
checksum = "
|
|
492
|
+
checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a"
|
|
493
493
|
|
|
494
494
|
[[package]]
|
|
495
495
|
name = "unicode-ident"
|
|
@@ -499,9 +499,9 @@ checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
|
|
499
499
|
|
|
500
500
|
[[package]]
|
|
501
501
|
name = "unicode-properties"
|
|
502
|
-
version = "0.1.
|
|
502
|
+
version = "0.1.5"
|
|
503
503
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
504
|
-
checksum = "
|
|
504
|
+
checksum = "993ad287eb20e8ba755312801cfe1413e0f25d604075863acaddca10b04c1833"
|
|
505
505
|
|
|
506
506
|
[[package]]
|
|
507
507
|
name = "web_atoms"
|
|
@@ -523,13 +523,13 @@ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
|
523
523
|
|
|
524
524
|
[[package]]
|
|
525
525
|
name = "winnow"
|
|
526
|
-
version = "1.0.
|
|
526
|
+
version = "1.0.5"
|
|
527
527
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
528
|
-
checksum = "
|
|
528
|
+
checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef"
|
|
529
529
|
|
|
530
530
|
[[package]]
|
|
531
531
|
name = "xtask"
|
|
532
|
-
version = "0.1.
|
|
532
|
+
version = "0.1.47"
|
|
533
533
|
dependencies = [
|
|
534
534
|
"anyhow",
|
|
535
535
|
"serde_json",
|
|
@@ -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,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mdhtml
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.47
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Requires-Dist: fast5ever>=0.1.5
|
|
7
7
|
Requires-Dist: fastcore>=2.2.7
|
|
8
8
|
Requires-Dist: aidialog>=0.0.22
|
|
9
|
-
Requires-Dist: aihist>=0.1.
|
|
9
|
+
Requires-Dist: aihist>=0.1.3
|
|
10
10
|
Requires-Dist: pyyaml>=6.0.3
|
|
11
11
|
Requires-Dist: fastws-cli>=0.0.20 ; extra == 'dev'
|
|
12
12
|
Requires-Dist: fastship>=0.1.5 ; extra == 'dev'
|
|
@@ -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
|
|
@@ -148,6 +150,8 @@ Use `--head` to inline additional `.css` and `.js` files. `examples/sample.css`
|
|
|
148
150
|
|
|
149
151
|
Pass a `.ipynb` file to view a Jupyter notebook. Code cells appear as highlighted Python blocks. A bordered `output` section below each cell shows its stored outputs. Streams, results, and tracebacks appear as text. HTML display objects, such as DataFrames, render as HTML. Images are inlined. Markdown cells support cross-references, footnotes, math, and frontmatter. See `examples/nbsample.ipynb` for a demonstration.
|
|
150
152
|
|
|
153
|
+
Use `--fill` to view a Markdown or notebook template filled from its `formdata`. This executes the template's participating code, as `fillmd` does. Unresolved fields remain visible and produce warnings. Filled notebooks use exported messages when any exist, otherwise non-pinned messages.
|
|
154
|
+
|
|
151
155
|
In Solveit dialogs, each prompt appears in a bordered `prompt` section. Its AI reply is indented below it in a `reply` section. Tool calls encoded as fastllm fenced JSON blocks appear as folded details with code-span labels.
|
|
152
156
|
|
|
153
157
|
```bash
|
|
@@ -155,6 +159,7 @@ viewmd README.md
|
|
|
155
159
|
viewmd draft.md --refs=ids
|
|
156
160
|
viewmd examples/sample.md --head examples/sample.css --head examples/sample.js
|
|
157
161
|
viewmd examples/nbsample.ipynb
|
|
162
|
+
viewmd template.ipynb --fill
|
|
158
163
|
```
|
|
159
164
|
|
|
160
165
|
### Filling templates
|
|
@@ -569,7 +574,7 @@ html = mdhtml2html(md2mdhtml(markdown), number_headings='legal')
|
|
|
569
574
|
|
|
570
575
|
In `resolve` mode, cross-references become links with resolved text. `[@sec-pay]` becomes `<a href="#sec-pay">Section 1.</a>`. Groups use text such as "Sections 1. and 1.(a)". Figure and table references use text such as "Figure 1".
|
|
571
576
|
|
|
572
|
-
`reftypes=dict(
|
|
577
|
+
The built-in reference types are `sec` (Section/Sections), `fig` (Figure/Figures), `tbl` (Table/Tables), `eq` (Equation/Equations), and `exh` (Exhibit/Exhibits). Use `reftypes=dict(app=('Appendix', 'Appendices'))` to add prefix words for another type. Missing targets, unknown tokens, and unknown types that need a prefix raise errors. The Word-only `page` and `rel` variants display the full number.
|
|
573
578
|
|
|
574
579
|
Two other modes support previews and drafts:
|
|
575
580
|
|
|
@@ -687,7 +692,7 @@ cat input.md | md2mdhtml --math=dollars
|
|
|
687
692
|
from mdhtml import mdhtml2pdf, mdhtml2typst
|
|
688
693
|
|
|
689
694
|
typ = mdhtml2typst(md2mdhtml(markdown), number_headings='legal')
|
|
690
|
-
mdhtml2pdf(md2mdhtml(markdown), 'out.pdf'
|
|
695
|
+
mdhtml2pdf(md2mdhtml(markdown), 'out.pdf')
|
|
691
696
|
```
|
|
692
697
|
|
|
693
698
|
Typst resolves references at compile time. `[@sec-pay]` becomes `#ref(<sec-pay>, supplement: [Section])`. Reference numbers update when you edit and recompile the `.typ` file. This differs from exporters that resolve reference text during export.
|
|
@@ -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
|
|
@@ -116,6 +118,8 @@ Use `--head` to inline additional `.css` and `.js` files. `examples/sample.css`
|
|
|
116
118
|
|
|
117
119
|
Pass a `.ipynb` file to view a Jupyter notebook. Code cells appear as highlighted Python blocks. A bordered `output` section below each cell shows its stored outputs. Streams, results, and tracebacks appear as text. HTML display objects, such as DataFrames, render as HTML. Images are inlined. Markdown cells support cross-references, footnotes, math, and frontmatter. See `examples/nbsample.ipynb` for a demonstration.
|
|
118
120
|
|
|
121
|
+
Use `--fill` to view a Markdown or notebook template filled from its `formdata`. This executes the template's participating code, as `fillmd` does. Unresolved fields remain visible and produce warnings. Filled notebooks use exported messages when any exist, otherwise non-pinned messages.
|
|
122
|
+
|
|
119
123
|
In Solveit dialogs, each prompt appears in a bordered `prompt` section. Its AI reply is indented below it in a `reply` section. Tool calls encoded as fastllm fenced JSON blocks appear as folded details with code-span labels.
|
|
120
124
|
|
|
121
125
|
```bash
|
|
@@ -123,6 +127,7 @@ viewmd README.md
|
|
|
123
127
|
viewmd draft.md --refs=ids
|
|
124
128
|
viewmd examples/sample.md --head examples/sample.css --head examples/sample.js
|
|
125
129
|
viewmd examples/nbsample.ipynb
|
|
130
|
+
viewmd template.ipynb --fill
|
|
126
131
|
```
|
|
127
132
|
|
|
128
133
|
### Filling templates
|
|
@@ -537,7 +542,7 @@ html = mdhtml2html(md2mdhtml(markdown), number_headings='legal')
|
|
|
537
542
|
|
|
538
543
|
In `resolve` mode, cross-references become links with resolved text. `[@sec-pay]` becomes `<a href="#sec-pay">Section 1.</a>`. Groups use text such as "Sections 1. and 1.(a)". Figure and table references use text such as "Figure 1".
|
|
539
544
|
|
|
540
|
-
`reftypes=dict(
|
|
545
|
+
The built-in reference types are `sec` (Section/Sections), `fig` (Figure/Figures), `tbl` (Table/Tables), `eq` (Equation/Equations), and `exh` (Exhibit/Exhibits). Use `reftypes=dict(app=('Appendix', 'Appendices'))` to add prefix words for another type. Missing targets, unknown tokens, and unknown types that need a prefix raise errors. The Word-only `page` and `rel` variants display the full number.
|
|
541
546
|
|
|
542
547
|
Two other modes support previews and drafts:
|
|
543
548
|
|
|
@@ -655,7 +660,7 @@ cat input.md | md2mdhtml --math=dollars
|
|
|
655
660
|
from mdhtml import mdhtml2pdf, mdhtml2typst
|
|
656
661
|
|
|
657
662
|
typ = mdhtml2typst(md2mdhtml(markdown), number_headings='legal')
|
|
658
|
-
mdhtml2pdf(md2mdhtml(markdown), 'out.pdf'
|
|
663
|
+
mdhtml2pdf(md2mdhtml(markdown), 'out.pdf')
|
|
659
664
|
```
|
|
660
665
|
|
|
661
666
|
Typst resolves references at compile time. `[@sec-pay]` becomes `#ref(<sec-pay>, supplement: [Section])`. Reference numbers update when you edit and recompile the `.typ` file. This differs from exporters that resolve reference text during export.
|
|
@@ -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
|
+
`````
|