Browse Source

docs: replace `.js` with `.mjs` in links to files

pull/981/head
Sindre Bøyum 5 months ago
committed by GitHub
parent
commit
847444fc0c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CONTRIBUTING.md
  2. 10
      README.md
  3. 12
      docs/architecture.md
  4. 2
      support/api_header.md

2
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:

10
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.

12
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.

2
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,

Loading…
Cancel
Save