mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1726374 - Correctly highlight <!-- a <!-->b in View Source. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D123061
This commit is contained in:
parent
b968f7a794
commit
974eddfb01
@ -289,6 +289,7 @@ int32_t nsHtml5Highlighter::Transition(int32_t aState, bool aReconsume,
|
||||
case nsHtml5Tokenizer::COMMENT_START_DASH:
|
||||
case nsHtml5Tokenizer::BOGUS_COMMENT:
|
||||
case nsHtml5Tokenizer::BOGUS_COMMENT_HYPHEN:
|
||||
case nsHtml5Tokenizer::COMMENT_LESSTHAN_BANG_DASH_DASH:
|
||||
if (aState == nsHtml5Tokenizer::DATA) {
|
||||
AddClass(sComment);
|
||||
FinishTag();
|
||||
|
@ -1,4 +1,4 @@
|
||||
<html><head><meta name="viewport" content="width=device-width"><title>file:///opt/Projects/gecko/parser/htmlparser/tests/reftest/bug1319410-1.html</title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="highlight" style="tab-size: 4"><pre id="line1"><span></span><span class="doctype"><!DOCTYPE html></span><span>
|
||||
<html><head><meta name="viewport" content="width=device-width"><title></title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="highlight" style="tab-size: 4"><pre id="line1"><span></span><span class="doctype"><!DOCTYPE html></span><span>
|
||||
<span id="line2"></span></span><span class="comment"><!-- -- --></span><span>
|
||||
<span id="line3"></span></span><span class="error comment" title="Saw “<!--” within a comment. Probable cause: Nested comment (not allowed)."><!-- <!-- --></span><span> -->
|
||||
<span id="line4"></span></span><span class="error comment" title="Premature end of comment. Use “-->” to end a comment properly."><!--></span><span>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<html><head><meta name="viewport" content="width=device-width"><title>file:///opt/Projects/gecko/parser/htmlparser/tests/reftest/bug1650087-1.html</title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="highlight" style="tab-size: 4"><pre id="line1"><span></span><span class="doctype"><!DOCTYPE html></span><span>
|
||||
<html><head><meta name="viewport" content="width=device-width"><title></title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="highlight" style="tab-size: 4"><pre id="line1"><span></span><span class="doctype"><!DOCTYPE html></span><span>
|
||||
<span id="line2"></span></span><span><<span class="start-tag">template</span>></span><span></span><span><<span class="start-tag">td</span>></span><span></span><span></<span class="end-tag">template</span>></span><span>
|
||||
<span id="line3"></span></span><span><<span class="start-tag">template</span>></span><span></span><span><<span class="start-tag">tr</span>></span><span></span><span></<span class="end-tag">template</span>></span><span>
|
||||
<span id="line4"></span></span><span><<span class="start-tag">template</span>></span><span></span><span><<span class="start-tag">thead</span>></span><span></span><span></<span class="end-tag">template</span>></span><span>
|
||||
|
2
parser/htmlparser/tests/reftest/bug1726374-1-ref.html
Normal file
2
parser/htmlparser/tests/reftest/bug1726374-1-ref.html
Normal file
@ -0,0 +1,2 @@
|
||||
<html><head><meta name="viewport" content="width=device-width"><title></title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="highlight" style="tab-size: 4"><pre id="line1"><span></span><span class="doctype"><!DOCTYPE html></span><span></span><span class="comment"><!-- a <!--></span><span>b
|
||||
<span id="line2"></span></span></pre></body></html>
|
1
parser/htmlparser/tests/reftest/bug1726374-1.html
Normal file
1
parser/htmlparser/tests/reftest/bug1726374-1.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><!-- a <!-->b
|
@ -28,3 +28,4 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == view-source:bug673094-1.
|
||||
== bug1636607-2.html bug1636607-2-ref.html
|
||||
== view-source:bug1319410-1.html bug1319410-1-ref.html
|
||||
== view-source:bug1650087-1.html bug1650087-1-ref.html
|
||||
== view-source:bug1726374-1.html bug1726374-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user