Skip to content

Commit

Permalink
Hide formatted literals not a selected locale.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Sep 17, 2023
1 parent ac9655c commit 73ef7f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/project/RootView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 73ef7f8

Please sign in to comment.