fix: recognize class-attached investigation diagram nodes
Generic Container CI/CD / test-build-publish (push) Successful in 1m11s
Frontend CI/CD / build-test-publish-and-deploy (push) Successful in 1m11s

This commit is contained in:
2026-11-02 15:23:34 +08:00
parent c0e4231b83
commit 5f7041ffae
3 changed files with 11 additions and 2 deletions
@@ -166,7 +166,7 @@ export function paintInvestigationDiagramStates(root: Element, diagram: Investig
export function styleInvestigationDiagram(diagram: InvestigationDiagram, running = false) {
const assignments = diagram.node_refs.flatMap((node) => {
const escaped = node.node_id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
const inSource = new RegExp(`\\b${escaped}(?=\\s*(?:[\\[({@;]|--|==|-\\.|$))`, "m").test(
const inSource = new RegExp(`(?:^|[^A-Za-z0-9_-])${escaped}(?=\\s*(?:[\\[({@;]|:::|--|==|-\\.|$))`, "m").test(
diagram.mermaid
);
if (!inSource) return [];