From 5b73e63f7c53600801f6c18c7df1fa15d729844d Mon Sep 17 00:00:00 2001 From: Magus Date: Sun, 10 Mar 2024 16:03:02 +0700 Subject: [PATCH] Add CompOption to translation and inlay hints, also GMessage/NMessage/BMessage to inlay. --- server/src/inlay.ts | 2 +- server/src/translation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/inlay.ts b/server/src/inlay.ts index 9e2b246..6788b1b 100644 --- a/server/src/inlay.ts +++ b/server/src/inlay.ts @@ -45,7 +45,7 @@ export function getHints( let regex: RegExp; if (traExt == "msg") { regex = - /(Reply|NOption|GOption|BOption|mstr|display_mstr|floater|NLowOption|BLowOption|GLowOption)\((\d+)/g; + /(Reply|NOption|GOption|BOption|mstr|display_mstr|floater|NLowOption|BLowOption|GLowOption|GMessage|NMessage|BMessage|CompOption)\((\d+)/g; } else { regex = /@(\d+)/g; } diff --git a/server/src/translation.ts b/server/src/translation.ts index 0e57335..675ac54 100644 --- a/server/src/translation.ts +++ b/server/src/translation.ts @@ -237,7 +237,7 @@ export class Translation implements Translation { } const regexMsg = - /^(Reply|NOption|GOption|BOption|mstr|display_mstr|floater|NLowOption|BLowOption|GLowOption|GMessage|NMessage|BMessage)\((\d+)$/; + /^(Reply|NOption|GOption|BOption|mstr|display_mstr|floater|NLowOption|BLowOption|GLowOption|GMessage|NMessage|BMessage|CompOption)\((\d+)$/; const regexTra = /^@[0-9]+$/; function getLineKey(word: string, ext: "tra" | "msg") {