mirror of https://github.com/vuejs/core.git
chore: document rationale for ignoring some parsing errors
This commit is contained in:
parent
e702b278d4
commit
6022ac05c4
|
|
@ -2037,6 +2037,10 @@ describe('compiler: parse', () => {
|
|||
})
|
||||
|
||||
describe('Errors', () => {
|
||||
// HTML parsing errors as specified at
|
||||
// https://html.spec.whatwg.org/multipage/parsing.html#parse-errors
|
||||
// We ignore some errors that do NOT affect parse result in meaningful ways
|
||||
// but have non-trivial implementation cost.
|
||||
const patterns: {
|
||||
[key: string]: Array<{
|
||||
code: string
|
||||
|
|
|
|||
|
|
@ -291,7 +291,6 @@ const tokenizer = new Tokenizer(stack, {
|
|||
if (currentElement && currentProp) {
|
||||
if (quote !== QuoteType.NoValue) {
|
||||
if (__BROWSER__ && currentAttrValue.includes('&')) {
|
||||
// TODO should not do this in <script> or <style>
|
||||
currentAttrValue = currentOptions.decodeEntities!(
|
||||
currentAttrValue,
|
||||
true
|
||||
|
|
|
|||
Loading…
Reference in New Issue