You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sure the problem is a parser problem. (If you are not sure, search for the issue in eslint-plugin-vue repo and open the issue in eslint-plugin-vue repo if there is no solution.
I have tried restarting my IDE and the issue persists.
I have updated to the latest version of the packages.
What version of ESLint are you using?
9.22.0
What version of eslint-plugin-vue and vue-eslint-parser are you using?
Because <textarea> is a RCDATA element, <div inside the element should not be parsed as a tag start. <div should be displayed verbatim.
Note that if you do one of the following, no parsing error occurs:
Remove {{ 123 }}
Remove }} before the <div
This problem occurs because after processing{{ 123 }}, vExpressionScriptState holding DATA is not cleared to null.
When encounting }} before the <div, the state is restored from the incorrect vExpressionScriptState and becomes DATA.
So, it results in parsing <div in the DATA state instead of RCDATA.
The text was updated successfully, but these errors were encountered:
ws807
changed the title
<textarea> content after }} causes invalid vue/no-parsing-error<textarea> content after }} causes invalid vue/no-parsing-errorApr 3, 2025
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
9.22.0
What version of
eslint-plugin-vue
andvue-eslint-parser
are you using?What did you do?
Configuration
What did you expect to happen?
npm run lint
should report no error.What actually happened?
Following errors occurred when running 'npm run lint'
Link to Minimal Reproducible Example
https://github.com/ws807/mustache-bug-report
Additional comments
Because
<textarea>
is a RCDATA element,<div
inside the element should not be parsed as a tag start.<div
should be displayed verbatim.Note that if you do one of the following, no parsing error occurs:
{{ 123 }}
}}
before the<div
This problem occurs because after processing
{{ 123 }}
,vExpressionScriptState
holdingDATA
is not cleared tonull
.When encounting
}}
before the<div
, the state is restored from the incorrectvExpressionScriptState
and becomesDATA
.So, it results in parsing
<div
in theDATA
state instead ofRCDATA
.#256 solves this problem.
The text was updated successfully, but these errors were encountered: