Skip to content

Commit 41b04e5

Browse files
committed
Fix incorrect option name in HTML parser error message
The error message for disabled text expressions incorrectly referred to the `html.parser.textExpression` option, which does not exist. Update it to reference the correct `html.parser.interpolation` option. Signed-off-by: Sora Morimoto <[email protected]>
1 parent fe90c78 commit 41b04e5

File tree

6 files changed

+18
-9
lines changed

6 files changed

+18
-9
lines changed

.changeset/thirty-readers-cross.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@biomejs/biome": patch
3+
---
4+
5+
Fix incorrect option name in HTML parser error message.
6+
7+
The error message for disabled text expressions incorrectly referred
8+
to the `html.parser.textExpression` option, which does not exist.
9+
Update it to reference the correct `html.parser.interpolation` option.

crates/biome_cli/tests/snapshots/main_cases_html/should_error_when_interpolation_is_disabled.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ file.html:1:6 parse ━━━━━━━━━━━━━━━━━━━━
4949
│ ^^^^^^^^^^^^^^^^^^^^
5050
2 │
5151
52-
i Remove it or enable the parsing using the html.parser.textExpression option.
52+
i Remove it or enable the parsing using the html.parser.interpolation option.
5353
5454
5555
```

crates/biome_html_formatter/tests/specs/prettier/html/interpolation/example.html.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ example.html:1:114 parse ━━━━━━━━━━━━━━━━━━
126126
│ ^^
127127
12 │
128128
129-
i Remove it or enable the parsing using the html.parser.textExpression option.
129+
i Remove it or enable the parsing using the html.parser.interpolation option.
130130
131131
example.html:11:72 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
132132
@@ -142,7 +142,7 @@ example.html:11:72 parse ━━━━━━━━━━━━━━━━━━
142142
19 │
143143
20 │ preserve
144144
145-
i Remove it or enable the parsing using the html.parser.textExpression option.
145+
i Remove it or enable the parsing using the html.parser.interpolation option.
146146
147147
example.html:18:65 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
148148
@@ -158,7 +158,7 @@ example.html:18:65 parse ━━━━━━━━━━━━━━━━━━
158158
│ ^^
159159
27 │
160160
161-
i Remove it or enable the parsing using the html.parser.textExpression option.
161+
i Remove it or enable the parsing using the html.parser.interpolation option.
162162
163163
example.html:26:35 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
164164
@@ -170,7 +170,7 @@ example.html:26:35 parse ━━━━━━━━━━━━━━━━━━
170170
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
171171
27 │
172172
173-
i Remove it or enable the parsing using the html.parser.textExpression option.
173+
i Remove it or enable the parsing using the html.parser.interpolation option.
174174
175175
176176
```

crates/biome_html_parser/src/syntax/parse_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub(crate) fn expected_attribute(p: &HtmlParser, range: TextRange) -> ParseDiagn
1010
}
1111

1212
pub(crate) fn disabled_interpolation(p: &HtmlParser, range: TextRange) -> ParseDiagnostic {
13-
p.err_builder("Text expressions aren't supported.", range).with_hint(markup!("Remove it or enable the parsing using the "<Emphasis>"html.parser.textExpression"</Emphasis>" option."))
13+
p.err_builder("Text expressions aren't supported.", range).with_hint(markup!("Remove it or enable the parsing using the "<Emphasis>"html.parser.interpolation"</Emphasis>" option."))
1414
}
1515

1616
pub(crate) fn expected_text_expression(

crates/biome_html_parser/tests/html_specs/error/interpolation.html.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ interpolation.html:1:52 parse ━━━━━━━━━━━━━━━━
144144
^^
145145
11
146146
147-
i Remove it or enable the parsing using the html.parser.textExpression option.
147+
i Remove it or enable the parsing using the html.parser.interpolation option.
148148
149149
interpolation.html:10:36 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
150150
@@ -154,6 +154,6 @@ interpolation.html:10:36 parse ━━━━━━━━━━━━━━━━
154154
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
155155
11 │
156156
157-
i Remove it or enable the parsing using the html.parser.textExpression option.
157+
i Remove it or enable the parsing using the html.parser.interpolation option.
158158
159159
```

crates/biome_html_parser/tests/html_specs/error/template-langs/django/issue-5450.html.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ issue-5450.html:1:3 parse ━━━━━━━━━━━━━━━━━━
113113
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114114
2 │
115115
116-
i Remove it or enable the parsing using the html.parser.textExpression option.
116+
i Remove it or enable the parsing using the html.parser.interpolation option.
117117
118118
issue-5450.html:1:43 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
119119

0 commit comments

Comments
 (0)