From 73ef7f8ca75993b7a071ff6bf14e519a63e1f699 Mon Sep 17 00:00:00 2001 From: "Amy J. Ko" Date: Sat, 16 Sep 2023 18:17:34 -0700 Subject: [PATCH] Hide formatted literals not a selected locale. --- src/components/project/RootView.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/project/RootView.svelte b/src/components/project/RootView.svelte index 769e0d771..2202fde27 100644 --- a/src/components/project/RootView.svelte +++ b/src/components/project/RootView.svelte @@ -23,6 +23,7 @@ import Program from '@nodes/Program'; import { languages } from '../../db/Database'; import TextLiteral from '../../nodes/TextLiteral'; + import FormattedLiteral from '../../nodes/FormattedLiteral'; export let node: Node; /** Optional space; if not provided, all nodes are rendered with preferred space. */ @@ -94,10 +95,11 @@ for (const tagged of node .nodes() .filter( - (n): n is Names | Docs | TextLiteral => + (n): n is Names | Docs | TextLiteral | FormattedLiteral => n instanceof Names || n instanceof Docs || - n instanceof TextLiteral + n instanceof TextLiteral || + n instanceof FormattedLiteral )) { // Get all the names or docs const tags = tagged.getTags();