* docs(using_advanced): adds `codefence` related extensions to known extensions
Added:
- `marked-code-format` for formatting code blocks using Prettier
- `marked-code-jsx-renderer` for rendering JSX code blocks using a custom renderer and components
- `marked-code-preview` for transforming code blocks into code previews
* docs(using_advanced): add `marked-sequential-hooks` to known extensions
* chore: typo
* chore: enclose package name in backticks
Co-authored-by: Tony Brix <tony@brix.ninja>
* chore: enclose package name in backticks
Co-authored-by: Tony Brix <tony@brix.ninja>
---------
Co-authored-by: Tony Brix <tony@brix.ninja>
BREAKING CHANGE:
- remove built files from git repo.
- If you need to use the latest version of marked on the web you can use a cdn to get marked.min.js from npm:
- `https://cdn.jsdelivr.net/npm/marked/marked.min.js`
* Tweaks to docs to make them clearer, regarding hooks and options to lexer/parser
* Remove extraneous commas
* Update description of lexer/renderer options
Introducing the wiki raito rendering engine among utilities that use markup.js, as a powered wiki engine, which competes strongly against other engines such as github wiki and mediawiki itself
BREAKING CHANGE:
- Default export removed. Use `import { marked } from 'marked'` or `const { marked } = require('marked')` instead.
- `/lib/marked.js` removed. Use `/marked.min.js` in script tag instead.
- When using marked in a script tag use `marked.parse(...)` instead of `marked(...)`
To properly integrate [highlight.js](https://github.com/highlightjs/highlight.js/) when using `marked.setOptions`, you need to leverage `langPrefix` to add an additional `hljs` class to the top-level `<code>` element which will be rendered.
Closes#2171
BREAKING CHANGES:
- Tokenizers will create their own tokens with `this.lexer.inline(text, tokens)`. The `inline` function will queue the token creation until after all block tokens are rendered.
- `nptable` tokenizer is removed and merged with `table` tokenizer.
- Extensions tokenizer `this` object will include the `lexer` as a property. `this.inlineTokens` becomes `this.lexer.inline`.
- Extensions parser `this` object will include the `parser` as a property. `this.parseInline` becomes `this.parser.parseInline`.
- `tag` and `inlineText` tokenizer function signatures have changed.