From 847444fc0c3c84403d95bad7919824fae6691bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sindre=20B=C3=B8yum?= Date: Mon, 11 Dec 2023 19:46:53 +0100 Subject: [PATCH] docs: replace `.js` with `.mjs` in links to files --- CONTRIBUTING.md | 2 +- README.md | 10 +++++----- docs/architecture.md | 12 ++++++------ support/api_header.md | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6e2aa8c..2f75aed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ ### If you commit changes: 1. Make sure all tests pass. -2. Run `./benchmark/benchmark.js`, make sure that performance not degraded. +2. Run `./benchmark/benchmark.mjs`, make sure that performance not degraded. 3. DON'T include auto-generated browser files to commit. ### Other things: diff --git a/README.md b/README.md index a1da36f..6c79f3c 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ const md = markdownit({ linkify: false, // Enable some language-neutral replacement + quotes beautification - // For the full list of replacements, see https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js + // For the full list of replacements, see https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.mjs typographer: false, // Double + single quotes replacement pairs, when typographer enabled, @@ -258,9 +258,9 @@ const md = markdownit({ You can find all rules in sources: -- [`parser_core.js`](lib/parser_core.js) -- [`parser_block.js`](lib/parser_block.js) -- [`parser_inline.js`](lib/parser_inline.js) +- [`parser_core.mjs`](lib/parser_core.mjs) +- [`parser_block.mjs`](lib/parser_block.mjs) +- [`parser_inline.mjs`](lib/parser_inline.mjs) ## Benchmark @@ -281,7 +281,7 @@ Sample: README.md (7774 bytes) > marked x 1,587 ops/sec ±4.31% (93 runs sampled) ``` -__Note.__ CommonMark version runs with [simplified link normalizers](https://github.com/markdown-it/markdown-it/blob/master/benchmark/implementations/current-commonmark/index.js) +__Note.__ CommonMark version runs with [simplified link normalizers](https://github.com/markdown-it/markdown-it/blob/master/benchmark/implementations/current-commonmark/index.mjs) for more "honest" compare. Difference is ≈1.5×. As you can see, `markdown-it` doesn't pay with speed for its flexibility. diff --git a/docs/architecture.md b/docs/architecture.md index 02dcee7..a96516c 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -48,7 +48,7 @@ The difference is simple: - There are special token objects, "inline containers", that have nested tokens. These are sequences with inline markup, such as bold, italic, text, etc. -See the [`Token`](https://github.com/markdown-it/markdown-it/blob/master/lib/token.js) class +See the [`Token`](https://github.com/markdown-it/markdown-it/blob/master/lib/token.mjs) class for details about each token's content. In total, a token stream is: @@ -66,8 +66,8 @@ intoto an AST. More details about tokens: -- [`Renderer` source](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js) -- [`Token` source](https://github.com/markdown-it/markdown-it/blob/master/lib/token.js) +- [`Renderer` source](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs) +- [`Token` source](https://github.com/markdown-it/markdown-it/blob/master/lib/token.mjs) - [Live demo](https://markdown-it.github.io/) - type your text and click the `debug` tab. @@ -179,8 +179,8 @@ And somewhere in between, you can apply additional transformations. Source code for each chain can be seen in the following files: -- [`parser_core.js`](https://github.com/markdown-it/markdown-it/blob/master/lib/parser_core.js) -- [`parser_block.js`](https://github.com/markdown-it/markdown-it/blob/master/lib/parser_block.js) -- [`parser_inline.js`](https://github.com/markdown-it/markdown-it/blob/master/lib/parser_inline.js) +- [`parser_core.mjs`](https://github.com/markdown-it/markdown-it/blob/master/lib/parser_core.mjs) +- [`parser_block.mjs`](https://github.com/markdown-it/markdown-it/blob/master/lib/parser_block.mjs) +- [`parser_inline.mjs`](https://github.com/markdown-it/markdown-it/blob/master/lib/parser_inline.mjs) Also, you can change output directly in a [`Renderer`](https://markdown-it.github.io/markdown-it/#Renderer) for many simple cases. diff --git a/support/api_header.md b/support/api_header.md index e7ddd29..65da378 100644 --- a/support/api_header.md +++ b/support/api_header.md @@ -88,7 +88,7 @@ const md = markdownit({ linkify: false, // Enable some language-neutral replacement + quotes beautification - // For the full list of replacements, see https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js + // For the full list of replacements, see https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.mjs typographer: false, // Double + single quotes replacement pairs, when typographer enabled,