${escapeHtml(unpad(span[2]))}`;
+ index += span[0].length;
+ continue;
+ }
+ html += escapeHtml(message[index]);
+ index++;
+ }
+ return html;
+}
+
+// the code without the space on each side that the verifier adds to code that holds a backtick or a space at an end
+function unpad(code: string): string {
+ return code.length >= 2 && code.startsWith(" ") && code.endsWith(" ") ? code.slice(1, -1) : code;
+}
+
+function renderReferenceLink(reference: LJSourceReference): string {
+ const { position } = reference;
+ return /*html*/`${escapeHtml(reference.text)}`;
+}
diff --git a/client/src/webview/script.spec.ts b/client/src/webview/script.spec.ts
index 70ac935..64563af 100644
--- a/client/src/webview/script.spec.ts
+++ b/client/src/webview/script.spec.ts
@@ -18,7 +18,7 @@ function diagnostic(file: string, title: string, category: 'error' | 'warning' =
const details = {
title,
message: `${title} message`,
- hints: [],
+ hints: [], messageNotes: [], references: [],
file,
position: { ...position, file },
};
@@ -60,7 +60,7 @@ const stateMachine: LJStateMachine = {
function stateError(title: string, sm: LJStateMachine, line = position.lineStart, file = currentFile): LJDiagnostic {
const errorPosition = { ...position, file, lineStart: line, lineEnd: line };
return {
- title, message: `${title} message`, hints: [], file, position: errorPosition,
+ title, message: `${title} message`, hints: [], messageNotes: [], references: [], file, position: errorPosition,
category: 'error', type: 'state-refinement-error', translationTable: {}, expected: 'Open(counter)',
found: { implication: null as never, origin: null, simplification: 'Closed(counter)' },
customMessage: '', declarationPosition: null, declarationPositions: [], declarationNotes: [], stateMachines: [sm],
diff --git a/client/src/webview/state-errors.spec.ts b/client/src/webview/state-errors.spec.ts
index 51f1f50..07c39ec 100644
--- a/client/src/webview/state-errors.spec.ts
+++ b/client/src/webview/state-errors.spec.ts
@@ -20,7 +20,7 @@ function stateError(line: number, overrides: Partial${message}
${renderMessageText(message)}
${links}${noteLines}`);
};
diff --git a/server/src/main/java/dtos/diagnostics/LJDiagnosticDTO.java b/server/src/main/java/dtos/diagnostics/LJDiagnosticDTO.java
index d47e124..04b213b 100644
--- a/server/src/main/java/dtos/diagnostics/LJDiagnosticDTO.java
+++ b/server/src/main/java/dtos/diagnostics/LJDiagnosticDTO.java
@@ -16,14 +16,24 @@ public class LJDiagnosticDTO {
public final List