Skip to content

Commit aad0e97

Browse files
committed
.
1 parent cc80d3f commit aad0e97

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/components/permanent/code/high_light_code.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ class CodeHighlighter extends Highlighter {
197197
_firstLetterIsUpperCase(word.substring(1))) {
198198
type = _HighlightType.constant;
199199
}
200-
201200
if (type != null) {
202201
_spans.add(_HighlightSpan(
203202
type, _scanner.lastMatch?.start??0, _scanner.lastMatch?.end??0));
@@ -217,10 +216,8 @@ class CodeHighlighter extends Highlighter {
217216

218217
void _simplify() {
219218
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);
224221
_spans.removeAt(i + 1);
225222
}
226223
}

0 commit comments

Comments
 (0)