Skip to content

Commit ccddb1e

Browse files
committed
[stex mode] Reset tokenizer after blank line
This prevents a stray $ from setting the whole rest of the document to math mode. Closes #2928
1 parent 21576a3 commit ccddb1e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mode/stex/stex.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@
240240
token: function(stream, state) {
241241
return state.f(stream, state);
242242
},
243+
blankLine: function(state) {
244+
state.f = normal;
245+
},
243246
lineComment: "%"
244247
};
245248
});

0 commit comments

Comments
 (0)