diff --git a/index.js b/index.js index 245e5bf..e68c5fd 100644 --- a/index.js +++ b/index.js @@ -271,7 +271,8 @@ function decoLine } csRe.lastIndex = 0 matches = line.text.matchAll(csRe) - matches.forEach(match => { + for (const match of matches) { + // matches.forEach(match => { let start, end start = match.indices[0][0] @@ -284,13 +285,13 @@ function decoLine group2 = match.indices[2] if (group2[0] == group2[1]) - return + continue line.text.slice(group2[0], group2[1]).split(';').forEach(attr => { if (attr.length) addAttr(line, start, end, attr) }) } - }) + } ranges.forEach(r => r.skipStyle || builder.add(r.from, r.to, r.dec)) { let filtered diff --git a/package.json b/package.json index 231459c..267e084 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cookshack/codemirror-ansi", - "version": "0.1.2", + "version": "0.1.3", "description": "ANSI escape code extension for Codemirror 6", "homepage": "https://git.sr.ht/~mattmundell/codemirror-ansi", "scripts": {