File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
lib/components/permanent/code Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,6 @@ class CodeHighlighter extends Highlighter {
197
197
_firstLetterIsUpperCase (word.substring (1 ))) {
198
198
type = _HighlightType .constant;
199
199
}
200
-
201
200
if (type != null ) {
202
201
_spans.add (_HighlightSpan (
203
202
type, _scanner.lastMatch? .start?? 0 , _scanner.lastMatch? .end?? 0 ));
@@ -217,10 +216,8 @@ class CodeHighlighter extends Highlighter {
217
216
218
217
void _simplify () {
219
218
for (int i = _spans.length - 2 ; i >= 0 ; i -= 1 ) {
220
- if (_spans[i].type == _spans[i + 1 ].type &&
221
- _spans[i].end == _spans[i + 1 ].start) {
222
- _spans[i] =
223
- _HighlightSpan (_spans[i].type, _spans[i].start, _spans[i + 1 ].end);
219
+ if (_spans[i].type == _spans[i + 1 ].type && _spans[i].end == _spans[i + 1 ].start) {
220
+ _spans[i] = _HighlightSpan (_spans[i].type, _spans[i].start, _spans[i + 1 ].end);
224
221
_spans.removeAt (i + 1 );
225
222
}
226
223
}
You can’t perform that action at this time.
0 commit comments