RESOLVED CONFIGURATION CHANGED55838
Syntax highlighting for </title> </noscript> etc.
https://bugs.webkit.org/show_bug.cgi?id=55838
Summary Syntax highlighting for </title> </noscript> etc.
Sadrul Habib Chowdhury
Reported 2011-03-05 22:51:34 PST
Created attachment 84884 [details] proposed fix Chromium bug: http://crbug.com/62931 Some tags (e.g. </title> </noscript> etc.) are not highlighted properly in the view-source page. Please note that I have not attached a relevant Changelog entry, since I expect that the proposed fix in the patch will be improved after review comments.
Attachments
proposed fix (1.42 KB, patch)
2011-03-05 22:51 PST, Sadrul Habib Chowdhury
abarth: review-
Adam Barth
Comment 1 2011-03-06 12:24:51 PST
Comment on attachment 84884 [details] proposed fix This isn't the right approach. The underlying issue is that the SourceTracker assumes that nextToken keeps HTMLInputStream exactly in sync with the emitted tokens. The truth is slightly more complicated because HTMLTokenizer internally buffers tokens in some cases. This patch attempts to make the assumption true by attempting to "unbuffer" the token back into the input stream. Instead, we should teach SourceTracker that this buffering can occur. Making that work properly is somewhat subtle. The approach that I think would make the most sense is to integrate the start() and end() functions from SourceTracker more closely with HTMLTokenizer. After all, it's really the tokenizer that understands where the tokens start and end, not the HTMLDocumentParser. Finally, all patches require a ChangeLog and tests. There are already some tests for view-source that you can use as a model.
Ahmad Saleem
Comment 2 2024-02-13 02:32:20 PST
@Anne - this is modifying HTMLTokenizer, so I just checking if this is needed anymore or we can close this bug?
Anne van Kesteren
Comment 3 2024-02-13 03:06:10 PST
I don't see this particular issue with our view source today (which is part of Web Inspector).
Note You need to log in before you can comment on or make changes to this bug.