brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Makes the tokenizer return errors when low-level HTML syntax is incorrect... #4307

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by njx Tuesday Aug 06, 2013 at 02:16 GMT Originally opened as https://github.com/adobe/brackets/pull/4663


...and makes the parser return null if the tokenizer rejects the syntax.

This fix by itself makes #4644 no longer reproduce, although we also still want to fix the issue with later edits referring to nodes deleted by earlier edits. We might want to consider figuring out a different set of repro steps for that issue that doesn't rely on this tokenization problem, and filing it as a separate bug/unit test case.

@dangoor


njx included the following code: https://github.com/adobe/brackets/pull/4663/commits

core-ai-bot commented 3 years ago

Comment by njx Tuesday Aug 06, 2013 at 02:20 GMT


Note that this will fail the parse if tokenization fails regardless of whether strict mode is on. I think that's correct--if the syntax is messed up at a low level, I don't think we want to try to do full diffs/updates either.

core-ai-bot commented 3 years ago

Comment by dangoor Tuesday Aug 06, 2013 at 14:12 GMT


Yeah, I agree with your comment that we shouldn't continue doing anything if it can't even tokenize the file.

core-ai-bot commented 3 years ago

Comment by dangoor Tuesday Aug 06, 2013 at 14:20 GMT


Other than the "break out of loop on error" question, this looks good. I'm going to merge this so that I can base my work on it.