Skip to content

Commit 4861a36

Browse files
committed
Fix some HTML errors and deal with - - >
1 parent bdd89df commit 4861a36

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

common/common.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,5 +272,6 @@ function unComment(doc, content) {
272272
.replace(/<!--/, '')
273273
.replace(/-->/, '')
274274
.replace(/< !\s*-\s*-/g, '<!--')
275-
.replace(/-\s*- >/g, '-->');
275+
.replace(/-\s*- >/g, '-->')
276+
.replace(/-\s*-\s*&gt;/g, '--&gt;');
276277
}

common/extract-examples.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def save_example(examples:, element:, title:, example_number:, error:, warn:)
223223
examples[title] = {
224224
title: title,
225225
filename: fn,
226-
content: content.to_s.gsub(/^\s*< !\s*-\s*-/, '<!--').gsub(/-\s*- >/, '-->'),
226+
content: content.to_s.gsub(/^\s*< !\s*-\s*-/, '<!--').gsub(/-\s*- >/, '-->').gsub(/-\s*-\s*&gt;/, '--&gt;'),
227227
content_type: element.attr('data-content-type'),
228228
number: example_number,
229229
ext: ext,

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8434,7 +8434,7 @@ <h3>Graph Containers</h3>
84348434
JSON-LD content can be easily embedded in HTML [[HTML52]] by placing
84358435
it in a <a data-cite="HTML52/semantics-scripting.html#the-script-element">Script element</a> with the <code>type</code> attribute set to
84368436
<code>application/ld+json</code>. Doing so creates a
8437-
<a data-cite="https://www.w3.org/TR/html52/semantics-scripting.html#data-block">data block</a>.</p>
8437+
<a data-cite="HTML52/semantics-scripting.html#data-block">data block</a>.</p>
84388438

84398439
<aside class="example ds-selector-tabs"
84408440
title="Embedding JSON-LD in HTML">
@@ -8710,7 +8710,7 @@ <h3>Graph Containers</h3>
87108710
"@context": "http://schema.org/",
87118711
"@type": "WebPageElement",
87128712
"name": "Encoding Issues",
8713-
"description": "Issues list such as unescaped &lt;/script&gt; or --&gt;"
8713+
"description": "Issues list such as unescaped &lt;/script&gt; or - -&gt;"
87148714
}
87158715
</script>
87168716
-->
@@ -8723,7 +8723,7 @@ <h3>Graph Containers</h3>
87238723
"@type": ["http://schema.org/WebPageElement"],
87248724
"http://schema.org/name": [{"@value": "Encoding Issues"}],
87258725
"http://schema.org/description": [
8726-
{"@value": "Issues list such as unescaped </script> or -- >"}
8726+
{"@value": "Issues list such as unescaped </script> or - - >"}
87278727
]
87288728
}]
87298729
-->
@@ -8738,7 +8738,7 @@ <h3>Graph Containers</h3>
87388738
87398739
[ a schema:WebPageElement;
87408740
schema:name "Encoding Issues";
8741-
schema:description "Issues list such as unescaped </script> or -- >"
8741+
schema:description "Issues list such as unescaped </script> or - - >"
87428742
] .
87438743
-->
87448744
</pre>

0 commit comments

Comments
 (0)