From f28ab537e4e0bcb82205cc81a0789e7711e51875 Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Wed, 29 Oct 2014 07:02:48 +0300 Subject: [PATCH] Fix subscript and superscript rules --- lib/rules_inline/sup.js | 4 ++-- test/fixtures/remarkable/sub.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rules_inline/sup.js b/lib/rules_inline/sup.js index e78a431..414e7cd 100644 --- a/lib/rules_inline/sup.js +++ b/lib/rules_inline/sup.js @@ -57,9 +57,9 @@ module.exports = function sup(state, silent) { state.pos = start + 1; if (!silent) { - state.push({ type: 'sub_open', level: state.level++ }); + state.push({ type: 'sup_open', level: state.level++ }); state.parser.tokenize(state); - state.push({ type: 'sub_close', level: --state.level }); + state.push({ type: 'sup_close', level: --state.level }); } state.pos = state.posMax + 1; diff --git a/test/fixtures/remarkable/sub.txt b/test/fixtures/remarkable/sub.txt index 240714e..53dfbdf 100644 --- a/test/fixtures/remarkable/sub.txt +++ b/test/fixtures/remarkable/sub.txt @@ -2,7 +2,7 @@ . ~foo ~bar~ baz~ . -

foo bar baz

+

foo bar baz

. .