Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
https://markdown-it.github.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
523 B
18 lines
523 B
'use strict';
|
|
|
|
module.exports = function inline(state) {
|
|
var tokens = state.tokens, tok, i, l;
|
|
|
|
// Parse inlines
|
|
for (i = 0, l = tokens.length; i < l; i++) {
|
|
tok = tokens[i];
|
|
if (tok.type === 'inline') {
|
|
state.md.inline.parse(tok.content, state.md, state.env, tok.children);
|
|
|
|
// Update position of all children to be absolute
|
|
for (var child = 0; child < tok.children.length; child++) {
|
|
tok.children[child].position = tok.children[child].position + tok.position;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|