From ace5e1c058610cfe6492097e6f8bcae216ec12fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Wed, 24 Feb 2016 14:33:23 +0100 Subject: [PATCH] Position in end result should be absolute --- lib/rules_core/inline.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/rules_core/inline.js b/lib/rules_core/inline.js index 4c33d0d..6148c82 100644 --- a/lib/rules_core/inline.js +++ b/lib/rules_core/inline.js @@ -8,6 +8,11 @@ module.exports = function inline(state) { 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; + } } } };