@codemirror/autocomplete 6.16.0 → 6.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1420,14 +1420,14 @@ class Snippet {
|
|
|
1420
1420
|
positions.push(new FieldPos(found, lines.length, m.index, m.index + name.length));
|
|
1421
1421
|
line = line.slice(0, m.index) + name + line.slice(m.index + m[0].length);
|
|
1422
1422
|
}
|
|
1423
|
-
|
|
1424
|
-
line = line.slice(0, esc.index) + esc[1] + line.slice(esc.index + esc[0].length);
|
|
1423
|
+
line = line.replace(/\\([{}])/g, (_, brace, index) => {
|
|
1425
1424
|
for (let pos of positions)
|
|
1426
|
-
if (pos.line == lines.length && pos.from >
|
|
1425
|
+
if (pos.line == lines.length && pos.from > index) {
|
|
1427
1426
|
pos.from--;
|
|
1428
1427
|
pos.to--;
|
|
1429
1428
|
}
|
|
1430
|
-
|
|
1429
|
+
return brace;
|
|
1430
|
+
});
|
|
1431
1431
|
lines.push(line);
|
|
1432
1432
|
}
|
|
1433
1433
|
return new Snippet(lines, positions);
|
package/dist/index.d.cts
CHANGED
|
@@ -522,7 +522,7 @@ interface CloseBracketConfig {
|
|
|
522
522
|
/**
|
|
523
523
|
The opening brackets to close. Defaults to `["(", "[", "{", "'",
|
|
524
524
|
'"']`. Brackets may be single characters or a triple of quotes
|
|
525
|
-
(as in `"'''
|
|
525
|
+
(as in `"'''"`).
|
|
526
526
|
*/
|
|
527
527
|
brackets?: string[];
|
|
528
528
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -522,7 +522,7 @@ interface CloseBracketConfig {
|
|
|
522
522
|
/**
|
|
523
523
|
The opening brackets to close. Defaults to `["(", "[", "{", "'",
|
|
524
524
|
'"']`. Brackets may be single characters or a triple of quotes
|
|
525
|
-
(as in `"'''
|
|
525
|
+
(as in `"'''"`).
|
|
526
526
|
*/
|
|
527
527
|
brackets?: string[];
|
|
528
528
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1418,14 +1418,14 @@ class Snippet {
|
|
|
1418
1418
|
positions.push(new FieldPos(found, lines.length, m.index, m.index + name.length));
|
|
1419
1419
|
line = line.slice(0, m.index) + name + line.slice(m.index + m[0].length);
|
|
1420
1420
|
}
|
|
1421
|
-
|
|
1422
|
-
line = line.slice(0, esc.index) + esc[1] + line.slice(esc.index + esc[0].length);
|
|
1421
|
+
line = line.replace(/\\([{}])/g, (_, brace, index) => {
|
|
1423
1422
|
for (let pos of positions)
|
|
1424
|
-
if (pos.line == lines.length && pos.from >
|
|
1423
|
+
if (pos.line == lines.length && pos.from > index) {
|
|
1425
1424
|
pos.from--;
|
|
1426
1425
|
pos.to--;
|
|
1427
1426
|
}
|
|
1428
|
-
|
|
1427
|
+
return brace;
|
|
1428
|
+
});
|
|
1429
1429
|
lines.push(line);
|
|
1430
1430
|
}
|
|
1431
1431
|
return new Snippet(lines, positions);
|