dot-language-support 4.3.3 → 4.3.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/dist/index.d.mts +0 -1
- package/dist/index.mjs +10 -4
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as lst from "vscode-languageserver-types";
|
|
2
2
|
import { Color as Color$1, ColorInformation, ColorPresentation } from "vscode-languageserver-types";
|
|
3
3
|
import { TextDocument } from "vscode-languageserver-textdocument";
|
|
4
|
-
|
|
5
4
|
//#region src/types.d.ts
|
|
6
5
|
declare const errorSource: {
|
|
7
6
|
readonly Scan: 1;
|
package/dist/index.mjs
CHANGED
|
@@ -324,7 +324,10 @@ function syntaxNodeToRange(doc, sourceFile, node) {
|
|
|
324
324
|
}
|
|
325
325
|
function escapeIdentifierText(text) {
|
|
326
326
|
if (text === "") return quote("");
|
|
327
|
-
if (text.includes("\"") || text.includes("\n"))
|
|
327
|
+
if (text.includes("\"") || text.includes("\n")) {
|
|
328
|
+
const esc = text.replace(/"/, "\\\"").replace(/\n/, "\\\n");
|
|
329
|
+
return quote(esc);
|
|
330
|
+
}
|
|
328
331
|
if (!isIdentifierStart(text.charCodeAt(0)) || text.includes(" ")) return quote(text);
|
|
329
332
|
return text;
|
|
330
333
|
}
|
|
@@ -2555,12 +2558,14 @@ function createEdgeViolationDiagnostics(file, expectedEdgeOp, violators) {
|
|
|
2555
2558
|
const category = diagnosticCategory.Error;
|
|
2556
2559
|
for (const edge of violators) edge.operation.flags |= syntaxNodeFlags.ContainsErrors;
|
|
2557
2560
|
return violators.map((edge) => {
|
|
2561
|
+
const start = getStart(file, edge.operation);
|
|
2562
|
+
const end = edge.operation.end;
|
|
2558
2563
|
return {
|
|
2559
2564
|
message,
|
|
2560
2565
|
code,
|
|
2561
2566
|
category,
|
|
2562
|
-
start
|
|
2563
|
-
end
|
|
2567
|
+
start,
|
|
2568
|
+
end
|
|
2564
2569
|
};
|
|
2565
2570
|
});
|
|
2566
2571
|
}
|
|
@@ -3065,7 +3070,8 @@ function getGeneralRefactorings(doc, file, range) {
|
|
|
3065
3070
|
if (isEdgeStatement(statement) && statement.rhs.length === 1 && !edgeStatementHasAttributes(statement)) {
|
|
3066
3071
|
const statementSource = statement.source;
|
|
3067
3072
|
if (isNodeId(statementSource)) {
|
|
3068
|
-
|
|
3073
|
+
const lowerSourceText = getIdentifierText(statementSource.id);
|
|
3074
|
+
if (sourceText === lowerSourceText) candidates.push(statement);
|
|
3069
3075
|
}
|
|
3070
3076
|
}
|
|
3071
3077
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dot-language-support",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.4",
|
|
4
4
|
"description": "Parser and language service for graphviz (dot) files",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dot",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"expect": "^30.4.1",
|
|
39
|
-
"oxfmt": "^0.
|
|
40
|
-
"oxlint": "^1.
|
|
39
|
+
"oxfmt": "^0.58.0",
|
|
40
|
+
"oxlint": "^1.73.0",
|
|
41
41
|
"oxlint-tsgolint": "^0.24.0",
|
|
42
|
-
"tsdown": "^0.22.
|
|
43
|
-
"typescript": "^
|
|
42
|
+
"tsdown": "^0.22.5",
|
|
43
|
+
"typescript": "^7.0.2"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=22"
|