@aiquants/markdown 12.1.0 → 12.2.1
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.
- package/README.md +5 -4
- package/dist/converter/NOTICES.md +3 -3
- package/dist/converter/worker.js +1 -1
- package/dist/converter.wasm +0 -0
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -220,7 +220,7 @@ const { htmlContent, headings } = await converter.convert(
|
|
|
220
220
|
- **Paths**: `filePath` is read as the service reads it. Give a local document's path relative to any absolute `workspaceRoot`: the converter writes workspace-relative document paths (`data-asset-src`, `data-doc-path`), the same as the service with the real root. The deny rules apply as written; symbolic links are not resolved, since there is no file system, so the service stays the authority when the host serves a target.
|
|
221
221
|
- **One conversion at a time**, in call order. One aborted before it starts never runs; one aborted while it runs rejects at once with the signal's reason and its answer is dropped, since a WebAssembly call cannot be interrupted. `timeoutMs` counts from the moment the converter is loaded; past it the converter stops its worker, rejects with `MarkdownConversionTimeoutError` and starts a new worker for the next conversion.
|
|
222
222
|
- **Errors**: `MarkdownResourceExhaustedError` past a size limit (the same class `./server` exports; the browser applies the service's default limits, an 8 MiB source and a 32 MiB HTML, lowered by `maxHtmlBytes`), `MarkdownConversionTimeoutError`, and `MarkdownConversionError` with `code`: `invalid_argument` for a refused request, `internal` when the converter failed on the document, `unavailable` when the converter could not load or was disposed (every later call fails the same way; create a new converter to retry). `dispose()` stops the worker.
|
|
223
|
-
- **Assets**: `converter.wasm` is about 9
|
|
223
|
+
- **Assets**: `converter.wasm` is about 6.9 MiB (gzip 1.8 MiB, brotli 1.3 MiB); serve it as `application/wasm`, so it compiles while it downloads, and compressed. The first conversion starts the worker, compiles the module and starts Go (about 0.4 s in Chromium); a 700-line document then converts in about 35 ms, the worker's round trip included. The worker is one self-contained script that starts with the `wasm_exec.js` of the Go toolchain that built the module, under its BSD license; `dist/converter/NOTICES.md` lists the licenses of everything linked into the module.
|
|
224
224
|
- **Content Security Policy**: a page that sets `script-src` needs `'wasm-unsafe-eval'` in it, and `worker-src 'self'` (or a `script-src` that covers the worker) for the same-origin worker.
|
|
225
225
|
- **Building from source** needs the Go toolchain on PATH: `pnpm run build` compiles `cmd/markdown-wasm` of `packages/go/markdown-api` and bundles the worker with the same toolchain's `wasm_exec.js` (`pnpm run build:converter` alone).
|
|
226
226
|
|
|
@@ -1139,7 +1139,9 @@ Links written for GitHub or VS Code (`[概要へ](#概要)`, `[使い方](#api-
|
|
|
1139
1139
|
Stricter than Pandoc, white space is Unicode's (the ideographic space included) and a `$` at the start of a line never closes. So `$20,000 and $30,000`, `$100〜$200`, `$HOME and $PATH` and `$ x $` are text, while `$x$`, `$a\$b$`, `$a\ $` and `$\text{for all $x$}$` are formulas; write a literal dollar as `\$` or inside a code span.
|
|
1140
1140
|
- Within a line of text, `$$ … $$` is inline math too (`Cost $$ x $$ here` is the formula `x`): it ends at the next run of as many `$`, with white space allowed inside its ends. An inline formula may continue on the paragraph's next line.
|
|
1141
1141
|
- Display math: a multi-line block, or a whole line `$$ e^{i\theta} = \cos\theta + i\sin\theta $$` (at most three spaces of indentation; it can follow a paragraph line directly). Both forms render the same. Inside code blocks the lines stay code.
|
|
1142
|
-
- A multi-line block opens on a line of two or more `$` whose rest holds no
|
|
1142
|
+
- A multi-line block opens on a line of two or more `$` whose rest holds no `$`, and that rest is the formula's first line. It closes on a line ending in two or more `$` that are not escaped as `\$`, and the text before them is the formula's last line, so `$$\begin{aligned}` … `\end{aligned}$$` is the same block as the form with each `$$` on its own line. A whole line `$$ x $$` inside a block and a line with a TeX comment (`a % cost $$`) are formula lines, not closing lines.
|
|
1143
|
+
- A line opens a block only when a closing line follows it, and a line that also holds formula text only when that closing line comes before the next blank line. Otherwise it stays paragraph text: a `$$` that nothing closes shows as text, and the blocks after it keep their shape. The check parses no blocks, so a line ending in `$$` inside a later fenced code block counts as a closing line.
|
|
1144
|
+
- Any other `$$ … $$` — within a line of text, or followed by more text on its line (`$$E=mc^2$$.`) — is inline math in its paragraph.
|
|
1143
1145
|
- A formula reaches KaTeX exactly as written: `0<x<1`, `a & b`, quotes and `x^2 + y^2` included (the converter escapes the formula's text once, the viewer reads the text back once, and the subscript, superscript and highlight syntax never applies inside a formula).
|
|
1144
1146
|
|
|
1145
1147
|
```markdown
|
|
@@ -1247,8 +1249,7 @@ The markup is the one the `ZennMessageNode` / `ZennDetailsNode` components rende
|
|
|
1247
1249
|
|
|
1248
1250
|
### Notes
|
|
1249
1251
|
|
|
1250
|
-
-
|
|
1251
|
-
- Double-tilde strikethrough (`~~text~~`) remains available via GFM.
|
|
1252
|
+
- Strikethrough takes exactly two tildes (`~~text~~`), which is narrower than GFM: a single tilde stays text, so `~text~` is reserved for subscript. A run of three or more tildes does not strike.
|
|
1252
1253
|
|
|
1253
1254
|
## License
|
|
1254
1255
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Third-party notices of the browser converter
|
|
2
2
|
|
|
3
3
|
`converter.wasm` is the Go program `cmd/markdown-wasm` of `packages/go/markdown-api`, compiled with the Go toolchain
|
|
4
|
-
go1.27.
|
|
4
|
+
go1.27.3; `converter/worker.js` starts with that toolchain's `wasm_exec.js`. They contain the following software.
|
|
5
5
|
|
|
6
|
-
## The Go toolchain go1.27.
|
|
6
|
+
## The Go toolchain go1.27.3 (the runtime, the standard library and `wasm_exec.js`)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
9
|
Copyright 2009 The Go Authors.
|
|
@@ -87,7 +87,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
87
87
|
SOFTWARE.
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
## github.com/yuin/goldmark v1.7
|
|
90
|
+
## github.com/yuin/goldmark v1.8.7
|
|
91
91
|
|
|
92
92
|
```text
|
|
93
93
|
MIT License
|
package/dist/converter/worker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! The first part of this file is wasm_exec.js of the Go toolchain go1.27.
|
|
1
|
+
/*! The first part of this file is wasm_exec.js of the Go toolchain go1.27.3, under the following license. See NOTICES.md for the converter's notices.
|
|
2
2
|
|
|
3
3
|
Copyright 2009 The Go Authors.
|
|
4
4
|
|
package/dist/converter.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiquants/markdown",
|
|
3
|
-
"version": "12.1
|
|
3
|
+
"version": "12.2.1",
|
|
4
4
|
"description": "Markdown renderer for React with advanced features",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"devDependencies": {
|
|
125
125
|
"@aiquants/platform-packaging": "0.1.1",
|
|
126
126
|
"@aiquants/spreadsheet": "0.19.0",
|
|
127
|
-
"@aiquants/virtualscroll": "3.
|
|
127
|
+
"@aiquants/virtualscroll": "3.23.1",
|
|
128
128
|
"@bufbuild/protoc-gen-es": "^1.10.1",
|
|
129
129
|
"@connectrpc/protoc-gen-connect-es": "^1.7.0",
|
|
130
130
|
"@tailwindcss/cli": "^4.1.18",
|
|
@@ -171,12 +171,12 @@
|
|
|
171
171
|
"access": "public"
|
|
172
172
|
},
|
|
173
173
|
"optionalDependencies": {
|
|
174
|
-
"@aiquants/markdown-linux-x64": "12.1
|
|
175
|
-
"@aiquants/markdown-linux-arm64": "12.1
|
|
176
|
-
"@aiquants/markdown-darwin-x64": "12.1
|
|
177
|
-
"@aiquants/markdown-darwin-arm64": "12.1
|
|
178
|
-
"@aiquants/markdown-win32-x64": "12.1
|
|
179
|
-
"@aiquants/markdown-win32-arm64": "12.1
|
|
174
|
+
"@aiquants/markdown-linux-x64": "12.2.1",
|
|
175
|
+
"@aiquants/markdown-linux-arm64": "12.2.1",
|
|
176
|
+
"@aiquants/markdown-darwin-x64": "12.2.1",
|
|
177
|
+
"@aiquants/markdown-darwin-arm64": "12.2.1",
|
|
178
|
+
"@aiquants/markdown-win32-x64": "12.2.1",
|
|
179
|
+
"@aiquants/markdown-win32-arm64": "12.2.1"
|
|
180
180
|
},
|
|
181
181
|
"scripts": {
|
|
182
182
|
"build": "pnpm -w run workspace:build \"$PNPM_SCRIPT_SRC_DIR\"",
|
|
@@ -207,8 +207,8 @@
|
|
|
207
207
|
"license-check": "pnpm dlx license-checker --production --onlyAllow \"MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;Unlicense\"",
|
|
208
208
|
"license-check:json": "pnpm dlx license-checker --production --onlyAllow \"MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;Unlicense\" --json",
|
|
209
209
|
"clean": "rimraf dist",
|
|
210
|
-
"publish:patch": "node scripts/build-platform-packages.mjs --preflight && pnpm run typecheck && pnpm run --if-present test && pnpm run build && node ../../.config/scripts/check-publish-leaks.mjs && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks",
|
|
211
|
-
"publish:minor": "node scripts/build-platform-packages.mjs --preflight && pnpm run typecheck && pnpm run --if-present test && pnpm run build && node ../../.config/scripts/check-publish-leaks.mjs && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks",
|
|
212
|
-
"publish:major": "node scripts/build-platform-packages.mjs --preflight && pnpm run typecheck && pnpm run --if-present test && pnpm run build && node ../../.config/scripts/check-publish-leaks.mjs && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks"
|
|
210
|
+
"publish:patch": "node scripts/build-platform-packages.mjs --preflight && pnpm run typecheck && pnpm run --if-present test && pnpm run build && node ../../.config/scripts/check-publish-leaks.mjs && node ../../.config/scripts/check-peer-floors.mjs --bump patch && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks",
|
|
211
|
+
"publish:minor": "node scripts/build-platform-packages.mjs --preflight && pnpm run typecheck && pnpm run --if-present test && pnpm run build && node ../../.config/scripts/check-publish-leaks.mjs && node ../../.config/scripts/check-peer-floors.mjs --bump minor && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks",
|
|
212
|
+
"publish:major": "node scripts/build-platform-packages.mjs --preflight && pnpm run typecheck && pnpm run --if-present test && pnpm run build && node ../../.config/scripts/check-publish-leaks.mjs && node ../../.config/scripts/check-peer-floors.mjs --bump major && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks"
|
|
213
213
|
}
|
|
214
214
|
}
|