@tenzir/codemirror-lang-tql 0.5.1 → 0.5.2
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/README.md +4 -3
- package/dist/index.cjs +5 -3
- package/dist/index.js +5 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -235,9 +235,10 @@ const extensions = [
|
|
|
235
235
|
|
|
236
236
|
## Editing
|
|
237
237
|
|
|
238
|
-
- **Quote pairing:** `closeBrackets()` pairs `(`, `[`, `{`,
|
|
239
|
-
after the
|
|
240
|
-
with up to 8 `#`.
|
|
238
|
+
- **Quote pairing:** `closeBrackets()` pairs `(`, `[`, `{`, and `"`, also
|
|
239
|
+
after the format prefix `f` and the byte and raw prefixes `b`, `r`, and
|
|
240
|
+
`br` with up to 8 `#`. TQL has no single-quoted strings, so `'` doesn't
|
|
241
|
+
pair. tree-sitter-tql parses a string without its closing quote
|
|
241
242
|
as a string that runs to the end of the document, as TQL's strings may span
|
|
242
243
|
lines, so typing the closing quote doesn't insert a pair. The same goes for a
|
|
243
244
|
`/*` comment without its `*/`.
|
package/dist/index.cjs
CHANGED
|
@@ -575,7 +575,7 @@ class TqlParse {
|
|
|
575
575
|
|
|
576
576
|
/** The queries of tree-sitter-tql that `tql` uses unless given others. */
|
|
577
577
|
const tqlQueries = { highlights, indents, folds, brackets, injections };
|
|
578
|
-
const
|
|
578
|
+
const hashedPrefixes = ["b", "r", "br"].flatMap((prefix) => {
|
|
579
579
|
return Array.from({ length: 9 }, (_, hashes) => prefix + "#".repeat(hashes));
|
|
580
580
|
});
|
|
581
581
|
/**
|
|
@@ -596,8 +596,10 @@ function tql(treeSitter, options = {}) {
|
|
|
596
596
|
const data = language.defineLanguageFacet({
|
|
597
597
|
commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
|
|
598
598
|
closeBrackets: {
|
|
599
|
-
//
|
|
600
|
-
|
|
599
|
+
// TQL has no single-quoted strings.
|
|
600
|
+
brackets: ["(", "[", "{", '"'],
|
|
601
|
+
// Byte and raw strings take up to 8 hashes, as in tree-sitter-tql.
|
|
602
|
+
stringPrefixes: ["f", ...hashedPrefixes],
|
|
601
603
|
},
|
|
602
604
|
indentOnInput: /^\s*[}\]]$/,
|
|
603
605
|
});
|
package/dist/index.js
CHANGED
|
@@ -573,7 +573,7 @@ class TqlParse {
|
|
|
573
573
|
|
|
574
574
|
/** The queries of tree-sitter-tql that `tql` uses unless given others. */
|
|
575
575
|
const tqlQueries = { highlights, indents, folds, brackets, injections };
|
|
576
|
-
const
|
|
576
|
+
const hashedPrefixes = ["b", "r", "br"].flatMap((prefix) => {
|
|
577
577
|
return Array.from({ length: 9 }, (_, hashes) => prefix + "#".repeat(hashes));
|
|
578
578
|
});
|
|
579
579
|
/**
|
|
@@ -594,8 +594,10 @@ function tql(treeSitter, options = {}) {
|
|
|
594
594
|
const data = defineLanguageFacet({
|
|
595
595
|
commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
|
|
596
596
|
closeBrackets: {
|
|
597
|
-
//
|
|
598
|
-
|
|
597
|
+
// TQL has no single-quoted strings.
|
|
598
|
+
brackets: ["(", "[", "{", '"'],
|
|
599
|
+
// Byte and raw strings take up to 8 hashes, as in tree-sitter-tql.
|
|
600
|
+
stringPrefixes: ["f", ...hashedPrefixes],
|
|
599
601
|
},
|
|
600
602
|
indentOnInput: /^\s*[}\]]$/,
|
|
601
603
|
});
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.5.
|
|
10
|
+
"version": "0.5.2",
|
|
11
11
|
"description": "Tenzir Query Language (TQL) support for CodeMirror, backed by tree-sitter-tql",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"codemirror",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@rollup/plugin-typescript": "^12.3.1",
|
|
50
50
|
"rollup": "^4.68.2",
|
|
51
51
|
"rollup-plugin-dts": "^6.5.1",
|
|
52
|
-
"tree-sitter-tql": "1.
|
|
52
|
+
"tree-sitter-tql": "1.5.0",
|
|
53
53
|
"tslib": "^2.9.1",
|
|
54
54
|
"typescript": "^5.9.3",
|
|
55
55
|
"web-tree-sitter": "^0.26.13"
|