Browse Source

Narrow hidden token check for line breaks in renderer

pull/1197/head
Vitaly Puzrin 2 months ago
parent
commit
6c60e21571
  1. 5
      src/renderer.ts

5
src/renderer.ts

@ -213,7 +213,10 @@ class Renderer {
// - a
// >
//
if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {
// Only closing hidden tokens count, to not break on other hidden ones.
//
if (token.block && token.nesting !== -1 && idx &&
tokens[idx - 1].hidden && tokens[idx - 1].nesting === -1) {
result += '\n'
}

Loading…
Cancel
Save