diff options
-rw-r--r-- | microlight.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/microlight.js b/microlight.js index 295cad2..a0ae720 100644 --- a/microlight.js +++ b/microlight.js | |||
@@ -79,9 +79,8 @@ | |||
79 | 79 | ||
80 | // checking if current token should be finalized | 80 | // checking if current token should be finalized |
81 | if (!chr || // end of content | 81 | if (!chr || // end of content |
82 | // types 9-10 (single-line comments) end with a | ||
83 | // newline | 82 | // newline |
84 | (tokenType > 8 && chr == '\n') || | 83 | chr == '\n' || prev1 == '\n' || |
85 | [ // finalize conditions for other token types | 84 | [ // finalize conditions for other token types |
86 | // 0: whitespaces | 85 | // 0: whitespaces |
87 | /\S/[test](chr), // merged together | 86 | /\S/[test](chr), // merged together |
@@ -109,7 +108,7 @@ | |||
109 | // (some types are highlighted similarly) | 108 | // (some types are highlighted similarly) |
110 | el[appendChild]( | 109 | el[appendChild]( |
111 | node = _document.createElement('span') | 110 | node = _document.createElement('span') |
112 | ).setAttribute('class', 'c'+( | 111 | ).setAttribute('class', 'f'+(firstToken|0)+' c'+( |
113 | // not formatted | 112 | // not formatted |
114 | !tokenType ? 0 : | 113 | !tokenType ? 0 : |
115 | // diff | 114 | // diff |