Skip to content

Commit 9ef917c

Browse files
authored
Merge pull request markedjs#1244 from markedjs/advanced-usage
Update advanced usage docs
2 parents 2deb464 + 374b899 commit 9ef917c

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

docs/USING_ADVANCED.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,25 @@ console.log(myMarked('I am using __markdown__.'));
3939

4040
<h2 id="options">Options</h2>
4141

42-
|Member |Type |Notes |
43-
|:-----------|:---------|:----------------------------------------------------------------------------------------------------------------------------|
44-
|baseUrl |`??` |Default is `null` |
45-
|breaks |`boolean` |Use GFM [hard](https://github.github.com/gfm/#hard-line-breaks) and [soft](https://github.github.com/gfm/#soft-line-breaks) line breaks. Requires `gfm` be `true`. Default: `false`|
46-
|gfm |`boolean` |Use approved [GitHub Flavored Markdown (GFM) specification](https://github.github.com/gfm/). |
47-
|headerIds |`boolean` |Whether to add an `id` attribute to headers. Default: `true` |
48-
|headerPrefix|`string` |A short string to add as a prefix to the `id` attributes added to headers by default. Default: `empty string` |
49-
|highlight |`function`|A function to highlight code blocks. See also: <a href="#highlight">Asynchronous highlighting</a>. |
50-
|langPrefix |`??` |Default is `lang-`
51-
|mangle |`boolean` |Default is `true`
52-
|pedantic |`boolean` |Conform to obscure parts of `markdown.pl` as much as possible. Don't fix original markdown bugs or behavior. Turns off and overrides `gfm`. Default: `false`|
53-
|renderer |`object` |An object containing functions to render tokens to HTML. See [extensibility](https://github.com/markedjs/marked/blob/master/docs/USING_PRO.md) for more details. Default: `new Renderer()`|
54-
|sanitize |`boolean` |Ignore HTML passed into `markdownString` (sanitize the input). Default: `false` |
55-
|sanitizer |`??` |Default is `null` |
56-
|silent |`boolean` |Default is `false` |
57-
|smartlists |`boolean` |Use smarter list behavior than those found in `markdown.pl`. Default: `true` |
58-
|smartypants |`boolean` |Use "smart" typographic punctuation for things like quotes and dashes. |
59-
|tables |`boolean` |Use [GFM Tables extension](https://github.github.com/gfm/#tables-extension-). Requires `gfm` be `true`. |
60-
|xhtml |`boolean` |Self-close the tags for void elements (&lt;br/&gt;, &lt;img/&gt;, etc.) with a "/" as required by XHTML. Default: `false` |
42+
|Member |Type |Default |Since |Notes |
43+
|:-----------|:---------|:--------|:--------|:-------------|
44+
|baseUrl |`string` |`null` |??? |A prefix url for any relative link. |
45+
|breaks |`boolean` |`false` |??? |If true, use GFM [hard](https://github.github.com/gfm/#hard-line-breaks) and [soft](https://github.github.com/gfm/#soft-line-breaks) line breaks. Requires `gfm` be `true`.|
46+
|gfm |`boolean` |`true` |??? |If trie. use approved [GitHub Flavored Markdown (GFM) specification](https://github.github.com/gfm/).|
47+
|headerIds |`boolean` |`true` |v0.4.0 |If true, include an `id` attribute when emitting headings (h1, h2, h3, etc).|
48+
|headerPrefix|`string` |`''` |??? |A string to prefix the `id` attribute when emitting headings (h1, h2, h3, etc).|
49+
|highlight |`function`|`null` |??? |A function to highlight code blocks, see <a href="#highlight">Asynchronous highlighting</a>.|
50+
|langPrefix |`string` |`'lang-'`|??? |A string to prefix the className in a `<code>` block. Useful for syntax highlighting.|
51+
|mangle |`boolean` |`true` |??? |??? |
52+
|pedantic |`boolean` |`false` |??? |If true, conform to the original `markdown.pl` as much as possible. Don't fix original markdown bugs or behavior. Turns off and overrides `gfm`.|
53+
|renderer |`object` |`new Renderer()`|???|An object containing functions to render tokens to HTML. See [extensibility](USING_PRO.md) for more details.|
54+
|sanitize |`boolean` |`false` |??? |If true, sanitize the HTML passed into `markdownString` with the `sanitizer` function.|
55+
|sanitizer |`function`|`null` |??? |A function to sanitize the HTML passed into `markdownString`.|
56+
|silent |`boolean` |`false` |??? |??? |
57+
|smartlists |`boolean` |`false` |??? |If true, use smarter list behavior than those found in `markdown.pl`.|
58+
|smartypants |`boolean` |`false` |??? |If true, use "smart" typographic punctuation for things like quotes and dashes.|
59+
|tables |`boolean` |`true` |??? |If true and `gfm` is true, use [GFM Tables extension](https://github.github.com/gfm/#tables-extension-).|
60+
|xhtml |`boolean` |`false` |??? |If true, emit self-closing HTML tags for void elements (&lt;br/&gt;, &lt;img/&gt;, etc.) with a "/" as required by XHTML.|
6161

6262
<h2 id="highlight">Asynchronous highlighting</h2>
6363

0 commit comments

Comments
 (0)