3. Render content and replace those random numbers with text
3. Render content and replace those random numbers with text
(or replace first, then render).
(or replace first, then render).
Or you can render html, then parse is to DOM (or
Or you can render html, then parse it to DOM (or
[cheerio](https://github.com/cheeriojs/cheerio) AST) and apply transformations
[cheerio](https://github.com/cheeriojs/cheerio) AST) and apply transformations
in more convenient way.
in more convenient way.
@ -69,17 +69,17 @@ __Note.__ Don't try to replace text with html markup! That's not secure.
#### Why my inline rule is not executed?
#### Why my inline rule is not executed?
Inline parser skips peases of texts for the best speed. It stops only on [small set of chars](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_inline/text.js), which can be tokens. We did not made this list extendable, also for performance reasons.
The inline parser skips pieces of texts for the best speed. It stops only on [a small set of chars](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_inline/text.js), which can be tokens. We did not made this list extendable, also for performance reasons.
If you are absolutely sure, that something important is missed there - create a
If you are absolutely sure that something important is missing there - create a
ticket and we will consider adding new charcodes.
ticket and we will consider adding new charcodes.
#### Why do you reject some useful things?
#### Why do you reject some useful things?
We do markdown parser. It should keep "markdown spirit". Other things should
We do a markdown parser. It should keep "markdown spirit". Other things should
be kept separate (in plugins, for example). We have no clear criteria, sorry.
be kept separate (in plugins, for example). We have no clear criteria, sorry.
Probably, you will find useful to read [CommonMark forum](http://talk.commonmark.org/) to understand us better.
Probably, you will find [CommonMark forum](http://talk.commonmark.org/) useful to read to understand us better.
Of cause, if you find architecture of this parser interesting for another type
Of cause, if you find architecture of this parser interesting for another type
of markup - you are welcome to reuse it in another project.
of markup - you are welcome to reuse it in another project.
Many people don't understand, that markdown format does not care much about
Many people don't understand that markdown format does not care much about
security. In many cases you have to pass output to sanitizers. `markdown-it`
security. In many cases you have to pass output to sanitizers. `markdown-it`
provides 2 possible stategies, to produce safe output:
provides 2 possible stategies to produce safe output:
1. Don't enable HTML. Extend markup features with [plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin). We think it's the best choice and use it by default.
1. Don't enable HTML. Extend markup features with [plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin). We think it's the best choice and use it by default.
- That's ok for 99% of user needs.
- That's ok for 99% of user needs.
@ -31,5 +31,5 @@ But there is one non-evident case you should know - don't allow plugins to
generate arbitrary element `id` and `name`. If those depend on user input -
generate arbitrary element `id` and `name`. If those depend on user input -
always add prefixes to avoid DOM clobbering. See [discussion](https://github.com/markdown-it/markdown-it/issues/28) for details.
always add prefixes to avoid DOM clobbering. See [discussion](https://github.com/markdown-it/markdown-it/issues/28) for details.
So, if you decide to use plugins, adding extended classes syntax or
So, if you decide to use plugins that add extended class syntax or