@codemirror/autocomplete 6.0.1 → 6.0.4
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 +18 -0
- package/dist/index.cjs +8 -1
- package/dist/index.js +8 -1
- package/package.json +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.0.4 (2022-07-07)
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
Remove a leftover `console.log` in bracket closing code.
|
|
6
|
+
|
|
7
|
+
## 6.0.3 (2022-07-04)
|
|
8
|
+
|
|
9
|
+
### Bug fixes
|
|
10
|
+
|
|
11
|
+
Fix a bug that caused `closeBrackets` to not close quotes when at the end of a syntactic construct that starts with a similar quote.
|
|
12
|
+
|
|
13
|
+
## 6.0.2 (2022-06-15)
|
|
14
|
+
|
|
15
|
+
### Bug fixes
|
|
16
|
+
|
|
17
|
+
Declare package dependencies as peer dependencies as an attempt to avoid duplicated package issues.
|
|
18
|
+
|
|
1
19
|
## 6.0.1 (2022-06-09)
|
|
2
20
|
|
|
3
21
|
### Bug fixes
|
package/dist/index.cjs
CHANGED
|
@@ -1664,8 +1664,15 @@ function nodeStart(state, pos) {
|
|
|
1664
1664
|
function probablyInString(state, pos, quoteToken) {
|
|
1665
1665
|
let node = language.syntaxTree(state).resolveInner(pos, -1);
|
|
1666
1666
|
for (let i = 0; i < 5; i++) {
|
|
1667
|
-
if (state.sliceDoc(node.from, node.from + quoteToken.length) == quoteToken)
|
|
1667
|
+
if (state.sliceDoc(node.from, node.from + quoteToken.length) == quoteToken) {
|
|
1668
|
+
let first = node.firstChild;
|
|
1669
|
+
while (first && first.from == node.from && first.to - first.from > quoteToken.length) {
|
|
1670
|
+
if (state.sliceDoc(first.to - quoteToken.length, first.to) == quoteToken)
|
|
1671
|
+
return false;
|
|
1672
|
+
first = first.firstChild;
|
|
1673
|
+
}
|
|
1668
1674
|
return true;
|
|
1675
|
+
}
|
|
1669
1676
|
let parent = node.to == pos && node.parent;
|
|
1670
1677
|
if (!parent)
|
|
1671
1678
|
break;
|
package/dist/index.js
CHANGED
|
@@ -1660,8 +1660,15 @@ function nodeStart(state, pos) {
|
|
|
1660
1660
|
function probablyInString(state, pos, quoteToken) {
|
|
1661
1661
|
let node = syntaxTree(state).resolveInner(pos, -1);
|
|
1662
1662
|
for (let i = 0; i < 5; i++) {
|
|
1663
|
-
if (state.sliceDoc(node.from, node.from + quoteToken.length) == quoteToken)
|
|
1663
|
+
if (state.sliceDoc(node.from, node.from + quoteToken.length) == quoteToken) {
|
|
1664
|
+
let first = node.firstChild;
|
|
1665
|
+
while (first && first.from == node.from && first.to - first.from > quoteToken.length) {
|
|
1666
|
+
if (state.sliceDoc(first.to - quoteToken.length, first.to) == quoteToken)
|
|
1667
|
+
return false;
|
|
1668
|
+
first = first.firstChild;
|
|
1669
|
+
}
|
|
1664
1670
|
return true;
|
|
1671
|
+
}
|
|
1665
1672
|
let parent = node.to == pos && node.parent;
|
|
1666
1673
|
if (!parent)
|
|
1667
1674
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codemirror/autocomplete",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.4",
|
|
4
4
|
"description": "Autocompletion for the CodeMirror code editor",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "cm-runtests",
|
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
"@codemirror/view": "^6.0.0",
|
|
32
32
|
"@lezer/common": "^1.0.0"
|
|
33
33
|
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@codemirror/language": "^6.0.0",
|
|
36
|
+
"@codemirror/state": "^6.0.0",
|
|
37
|
+
"@codemirror/view": "^6.0.0",
|
|
38
|
+
"@lezer/common": "^1.0.0"
|
|
39
|
+
},
|
|
34
40
|
"devDependencies": {
|
|
35
41
|
"@codemirror/buildhelper": "^0.1.5"
|
|
36
42
|
},
|