Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit 85e5b32

Browse files
committed
Add RAW_TAGS constant in parser/grammar.ts
1 parent ca103dc commit 85e5b32

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
import {
2-
RequiredOptions,
3-
SupportLanguage,
4-
SupportOptions,
5-
version,
6-
} from 'prettier';
1+
import { SupportLanguage, SupportOptions, version } from 'prettier';
72
import type { Plugin as Plugin2 } from 'prettier';
83
import type { Plugin as Plugin3 } from 'prettier3';
94
import { parsers, liquidHtmlLanguageName } from '~/parser';

src/parser/grammar.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ export const BLOCKS = (
3333
strictGrammars.LiquidHTML.rules as any
3434
).blockName.body.factors[0].terms.map((x: any) => x.obj) as string[];
3535

36+
// see ../../grammar/liquid-html.ohm for full list
37+
export const RAW_TAGS = (
38+
strictGrammars.LiquidHTML.rules as any
39+
).liquidRawTag.body.terms
40+
.map((term: any) => term.args[0].obj)
41+
.concat('comment') as string[];
42+
3643
// see ../../grammar/liquid-html.ohm for full list
3744
export const VOID_ELEMENTS = (
3845
strictGrammars.LiquidHTML.rules as any

0 commit comments

Comments
 (0)