From 6b58d255e6ff71110945eef7b8205b6e96e605cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Wed, 24 Feb 2016 10:49:24 +0100 Subject: [PATCH] Add position and size to code_inline --- lib/rules_inline/backticks.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rules_inline/backticks.js b/lib/rules_inline/backticks.js index 0cd1a99..5a1b986 100644 --- a/lib/rules_inline/backticks.js +++ b/lib/rules_inline/backticks.js @@ -31,6 +31,8 @@ module.exports = function backtick(state, silent) { token.content = state.src.slice(pos, matchStart) .replace(/[ \n]+/g, ' ') .trim(); + token.position = start; + token.size = (matchStart + 1) - token.position; } state.pos = matchEnd; return true;