You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hugo/content/playground/user-validator.ts
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,15 @@ export class PlaygroundValidator extends DefaultDocumentValidator {
11
11
constlinkingError=reference.error;
12
12
if(linkingError){
13
13
constinfo: DiagnosticInfo<AstNode,string>={
14
-
node: linkingError.container,
15
-
property: linkingError.property,
16
-
index: linkingError.index,
14
+
node: linkingError.info.container,
15
+
range: reference.$refNode?.range,
16
+
property: linkingError.info.property,
17
+
index: linkingError.info.index,
17
18
data: {
18
19
code: DocumentValidator.LinkingError,
19
-
containerType: linkingError.container.$type,
20
-
property: linkingError.property,
21
-
refText: linkingError.reference.$refText
20
+
containerType: linkingError.info.container.$type,
21
+
property: linkingError.info.property,
22
+
refText: linkingError.info.reference.$refText
22
23
}satisfiesLinkingErrorData
23
24
};
24
25
diagnostics.push(this.toDiagnostic('warning',`${linkingError.message}\nIn case you want to adjust the linking rules, please consult the learning section in the Langium documentation.`,info));
0 commit comments