mirror of https://github.com/sveltejs/svelte
fix: don't hang on a tag whose expression ends with a trailing slash (#18350)
close https://github.com/sveltejs/svelte/issues/18349pull/18351/head
parent
c74f44fff9
commit
b471c15e61
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: prevent infinite loop when a tag's expression ends with a trailing `/` at the end of the input
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
// A tag whose expression ends with a bare `/` at the end of the input used to
|
||||||
|
// make `find_matching_bracket` loop forever; it should error instead of hanging.
|
||||||
|
export default test({
|
||||||
|
error: {
|
||||||
|
code: 'unexpected_eof',
|
||||||
|
message: 'Unexpected end of input',
|
||||||
|
position: [12, 12]
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1 @@
|
|||||||
|
{let x = a /
|
||||||
Loading…
Reference in new issue