Skip to content

Commit 8fd853c

Browse files
committed
Polish HTML5 parsing script sample
Improve the HTML5 parsing demo snippet by expanding the inline `if` into a multi-line block and refining the demo string text. The escaped source example and live script output were updated together to stay consistent and easier to read.
1 parent e73aa47 commit 8fd853c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Source/Demo/Common/Samples/15.HTML5 Parsing.htm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,17 @@ <h2>&lt;script&gt; content is not mistaken for markup
9494
</p>
9595
<div class="comment">Source:</div>
9696
<pre>&lt;script&gt;
97-
if (1 &lt; 2 &amp;&amp; 3 &gt; 2) { runDemo('&lt;b&gt;this looks like a tag but is just a string&lt;/b&gt;'); }
97+
if (1 &lt; 2 &amp;&amp; 3 &gt; 2) {
98+
runDemo('&lt;b&gt;looks like a tag&lt;/b&gt;, but is just a string');
99+
}
98100
&lt;/script&gt;
99101
&lt;p&gt;This paragraph still renders correctly right after the script block.&lt;/p&gt;</pre>
100102
<div class="comment">Live result:</div>
101103
<div class="example">
102104
<script>
103-
if (1 < 2 && 3 > 2) { runDemo('<b>this looks like a tag but is just a string</b>'); }
105+
if (1 < 2 && 3 > 2) {
106+
runDemo('<b>looks like a tag</b>, but is just a string');
107+
}
104108
</script>
105109
<p>This paragraph still renders correctly right after the script block.</p>
106110
</div>

0 commit comments

Comments
 (0)