diff --git a/spec/index.html b/spec/index.html
index f43186e..7166350 100644
--- a/spec/index.html
+++ b/spec/index.html
@@ -1035,6 +1035,21 @@
Embedding YAML-LD in HTML Documents
-->
+
+ YAML syntax is indentation based. Before processing each `<script>` block with YAML-LD content, YAML-LD processor MUST dedent the body of the block using the following procedure:
+
+
+
+ - Count the number of leading spaces in the first line of the YAML-LD block, and save that to `dedent_count` variable,
+ -
+ For each line of the YAML-LD block,
+
+ - If the number of leading spaces is less than `dedent_count`, keep the line as-is,
+ - Otherwise, remove exactly `dedent_count` leading spaces from the line.
+
+
+
+
If the YAML-LD <script>
tag contains a YAML Stream with multiple YAML documents, each of these documents MUST be treated as if it was included in a separate <script>
tag.
diff --git a/tests/cases/html/dedent-needed.html b/tests/cases/html/dedent-needed.html
new file mode 100644
index 0000000..9a2c44d
--- /dev/null
+++ b/tests/cases/html/dedent-needed.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+Hi!
+
+
\ No newline at end of file
diff --git a/tests/cases/html/dedent-not-needed.html b/tests/cases/html/dedent-not-needed.html
new file mode 100644
index 0000000..4dc1785
--- /dev/null
+++ b/tests/cases/html/dedent-not-needed.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+Hi!
+
+
\ No newline at end of file
diff --git a/tests/cases/html-and-yaml-streams/in.html b/tests/cases/html/stream.html
similarity index 100%
rename from tests/cases/html-and-yaml-streams/in.html
rename to tests/cases/html/stream.html
diff --git a/tests/cases/html-and-yaml-streams/out.yamlld b/tests/cases/html/stream.yamlld
similarity index 100%
rename from tests/cases/html-and-yaml-streams/out.yamlld
rename to tests/cases/html/stream.yamlld
diff --git a/tests/manifest.jsonld b/tests/manifest.jsonld
index 345241a..8c7f080 100644
--- a/tests/manifest.jsonld
+++ b/tests/manifest.jsonld
@@ -195,8 +195,26 @@
"name": "YAML Stream with multiple documents embedded into HTML.",
"req": "must",
"option": {"extractAllScripts": true},
- "input": "cases/html-and-yaml-streams/in.html",
- "expect": "cases/html-and-yaml-streams/out.yamlld"
+ "input": "cases/html/stream.html",
+ "expect": "cases/html/stream.yamlld"
+ },
+ {
+ "@id": "#html-dedent-needed",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "YAML Stream with multiple documents embedded into HTML.",
+ "req": "must",
+ "option": {"extractAllScripts": true},
+ "input": "cases/html/dedent-needed.html",
+ "expect": "cases/html/stream.yamlld"
+ },
+ {
+ "@id": "#html-dedent-not-needed",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "YAML Stream with multiple documents embedded into HTML.",
+ "req": "must",
+ "option": {"extractAllScripts": true},
+ "input": "cases/html/dedent-not-needed.html",
+ "expect": "cases/html/stream.yamlld"
}
]
}