crossnote 0.9.42 → 0.9.44
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 +8 -8
- package/out/cjs/index.cjs +293 -283
- package/out/cli/index.cjs +266 -141
- package/out/dependencies/README.md +6 -3
- package/out/dependencies/katex/katex-swap.min.css +1 -1
- package/out/dependencies/katex/katex.min.css +1 -1
- package/out/dependencies/mermaid/mermaid.min.js +1268 -1315
- package/out/esm/index.mjs +264 -254
- package/out/server-app/server-app.css +1 -1
- package/out/types/src/custom-markdown-it-features/math.d.ts +1 -0
- package/out/types/src/markdown-engine/mermaid-export.d.ts +2 -0
- package/out/types/src/markdown-engine/mermaid-polyfill.d.ts +1 -0
- package/out/types/src/notebook/index.d.ts +2 -1
- package/out/types/src/notebook/types.d.ts +2 -1
- package/out/types/src/webview/lib/source-text-map.d.ts +25 -0
- package/out/types/test/browser/mermaid-export.spec.d.ts +1 -0
- package/out/types/test/chrome-export.test.d.ts +1 -0
- package/out/types/test/extended-table-syntax.test.d.ts +1 -0
- package/out/types/test/fence-resync.test.d.ts +1 -0
- package/out/types/test/katex-vendor.test.d.ts +1 -0
- package/out/types/test/mermaid-theme.test.d.ts +1 -0
- package/out/types/test/source-text-map.test.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/out/webview/backlinks.css +1 -1
- package/out/webview/backlinks.js +4 -4
- package/out/webview/graph-view.css +1 -1
- package/out/webview/preview.css +1 -1
- package/out/webview/preview.js +205 -202
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -191,15 +191,15 @@ The file is a full snapshot — for very large note collections (thousands of
|
|
|
191
191
|
notes with big images) it can get large; the build reports its size and any
|
|
192
192
|
note that failed to render (failures are skipped, not fatal).
|
|
193
193
|
|
|
194
|
-
##
|
|
194
|
+
## markdown-yo (Experimental)
|
|
195
195
|
|
|
196
|
-
Crossnote supports an optional high-performance markdown renderer called [
|
|
196
|
+
Crossnote supports an optional high-performance markdown renderer called [markdown-yo](https://github.com/shd101wyy/markdown-yo), written in the [Yo programming language](https://github.com/shd101wyy/Yo) and compiled to WebAssembly. When enabled, it replaces markdown-it for HTML rendering while markdown-it is still used for token-based operations (backlink extraction, note mention processing, etc.).
|
|
197
197
|
|
|
198
|
-
To enable it, set `markdownParser: '
|
|
198
|
+
To enable it, set `markdownParser: 'markdown-yo'` in your notebook config.
|
|
199
199
|
|
|
200
200
|
### Performance
|
|
201
201
|
|
|
202
|
-
By default, crossnote uses the **WASM** build of
|
|
202
|
+
By default, crossnote uses the **WASM** build of markdown-yo. The WASM module is initialized once per notebook and reused for all subsequent renders. The table below shows steady-state render times (WASM module already loaded) measured on an x86_64 Linux machine, compared to the native binary invoked as a subprocess:
|
|
203
203
|
|
|
204
204
|
| Input Size | markdown-it | WASM (pre-init) | Native binary (spawn) |
|
|
205
205
|
| ---------- | ----------- | --------------- | --------------------- |
|
|
@@ -214,20 +214,20 @@ For very large files (≥1 MB), the native binary is ~1.3× faster than WASM bec
|
|
|
214
214
|
|
|
215
215
|
### Native Binary
|
|
216
216
|
|
|
217
|
-
Pre-built binaries for Linux, macOS, and Windows are available at [github.com/shd101wyy/
|
|
217
|
+
Pre-built binaries for Linux, macOS, and Windows are available at [github.com/shd101wyy/markdown-yo/releases](https://github.com/shd101wyy/markdown-yo/releases).
|
|
218
218
|
|
|
219
219
|
To use a native binary instead of WASM, set `markdownYoBinaryPath`:
|
|
220
220
|
|
|
221
221
|
```yaml
|
|
222
|
-
markdownParser:
|
|
223
|
-
markdownYoBinaryPath: /path/to/
|
|
222
|
+
markdownParser: markdown-yo
|
|
223
|
+
markdownYoBinaryPath: /path/to/markdown-yo
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
Supports `$HOME` and `~` variable substitution. The `breakOnSingleNewLine` option is not supported by the native binary CLI and is silently ignored when this path is set.
|
|
227
227
|
|
|
228
228
|
### Supported Features
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
markdown-yo supports CommonMark, GFM tables, strikethrough, and these extensions: subscript, superscript, mark/highlight, math ($..$ / $$..$$), emoji shortcodes, wikilinks, CriticMarkup, abbreviations, definition lists, admonitions, callouts, footnotes, source maps, and line breaks.
|
|
231
231
|
|
|
232
232
|
## Development
|
|
233
233
|
|