@codemirror/state 6.5.0 → 6.5.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 +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -3846,7 +3846,7 @@ taking extending characters and tab size into account.
|
|
|
3846
3846
|
*/
|
|
3847
3847
|
function countColumn(string, tabSize, to = string.length) {
|
|
3848
3848
|
let n = 0;
|
|
3849
|
-
for (let i = 0; i < to;) {
|
|
3849
|
+
for (let i = 0; i < to && i < string.length;) {
|
|
3850
3850
|
if (string.charCodeAt(i) == 9) {
|
|
3851
3851
|
n += tabSize - (n % tabSize);
|
|
3852
3852
|
i++;
|
package/dist/index.d.cts
CHANGED
|
@@ -99,6 +99,9 @@ declare abstract class Text implements Iterable<string> {
|
|
|
99
99
|
objects that it is made up of. For leaf nodes, this holds null.
|
|
100
100
|
*/
|
|
101
101
|
abstract readonly children: readonly Text[] | null;
|
|
102
|
+
/**
|
|
103
|
+
@hide
|
|
104
|
+
*/
|
|
102
105
|
[Symbol.iterator]: () => Iterator<string>;
|
|
103
106
|
/**
|
|
104
107
|
Create a `Text` instance for the given array of lines.
|
package/dist/index.d.ts
CHANGED
|
@@ -99,6 +99,9 @@ declare abstract class Text implements Iterable<string> {
|
|
|
99
99
|
objects that it is made up of. For leaf nodes, this holds null.
|
|
100
100
|
*/
|
|
101
101
|
abstract readonly children: readonly Text[] | null;
|
|
102
|
+
/**
|
|
103
|
+
@hide
|
|
104
|
+
*/
|
|
102
105
|
[Symbol.iterator]: () => Iterator<string>;
|
|
103
106
|
/**
|
|
104
107
|
Create a `Text` instance for the given array of lines.
|
package/dist/index.js
CHANGED
|
@@ -3842,7 +3842,7 @@ taking extending characters and tab size into account.
|
|
|
3842
3842
|
*/
|
|
3843
3843
|
function countColumn(string, tabSize, to = string.length) {
|
|
3844
3844
|
let n = 0;
|
|
3845
|
-
for (let i = 0; i < to;) {
|
|
3845
|
+
for (let i = 0; i < to && i < string.length;) {
|
|
3846
3846
|
if (string.charCodeAt(i) == 9) {
|
|
3847
3847
|
n += tabSize - (n % tabSize);
|
|
3848
3848
|
i++;
|