Skip to content

Commit a679761

Browse files
committed
fix: clarify error message
closes #10109
1 parent 0071e02 commit a679761

File tree

2 files changed

+3
-2
lines changed
  • packages/svelte

2 files changed

+3
-2
lines changed

packages/svelte/src/compiler/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const parse = {
7878
* @param {string} reason
7979
*/
8080
'invalid-closing-tag-after-autoclose': (name, reason) =>
81-
`</${name}> attempted to close element that was already automatically closed by <${reason}>`,
81+
`</${name}> attempted to close element that was already automatically closed by <${reason}> (cannot nest <${reason}> inside <${name}>)`,
8282
'invalid-dollar-binding': () =>
8383
`The $ name is reserved, and cannot be used for variables and imports`,
8484
'invalid-dollar-prefix': () =>

packages/svelte/tests/compiler-errors/samples/unmatched-closing-tag-autoclose/_config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { test } from '../../test';
33
export default test({
44
error: {
55
code: 'invalid-closing-tag-after-autoclose',
6-
message: '</p> attempted to close element that was already automatically closed by <pre>',
6+
message:
7+
'</p> attempted to close element that was already automatically closed by <pre> (cannot nest <pre> inside <p>',
78
position: [24, 24]
89
}
910
});

0 commit comments

Comments
 (0)