aboutsummaryrefslogtreecommitdiff
path: root/spec.txt
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-08-01 16:15:51 -0700
committerGitHub <noreply@github.com>2017-08-01 16:15:51 -0700
commit45e0c72a183916744ffa95b43ce8d0ef013de07c (patch)
treef706cfbb8b17bc8ffeebfbd6ae288291cb730032 /spec.txt
parentf09a9775cf57f6842484acc98f9864b4551616fa (diff)
parentdb4c324fd3565ea8a706647375e0d365066b16a1 (diff)
Merge pull request #459 from kivikakk/html-block-clarification
Clarify HTML blocks re: "nested" blocks
Diffstat (limited to 'spec.txt')
-rw-r--r--spec.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/spec.txt b/spec.txt
index 0fe7da2..f14b227 100644
--- a/spec.txt
+++ b/spec.txt
@@ -2042,6 +2042,37 @@ or [closing tag] (with any [tag name] other than `script`,
or the end of the line.\
**End condition:** line is followed by a [blank line].
+HTML blocks continue until they are closed by their appropriate
+[end condition], or the last line of the document or other [container block].
+This means any HTML **within an HTML block** that might otherwise be recognised
+as a start condition will be ignored by the parser and passed through as-is,
+without changing the parser's state.
+
+For instance, `<pre>` within a HTML block started by `<table>` will not affect
+the parser state; as the HTML block was started in by start condition 6, it
+will end at any blank line. This can be surprising:
+
+```````````````````````````````` example
+<table><tr><td>
+<pre>
+**Hello**,
+
+_world_.
+</pre>
+</td></tr></table>
+.
+<table><tr><td>
+<pre>
+**Hello**,
+<p><em>world</em>.
+</pre></p>
+</td></tr></table>
+````````````````````````````````
+
+In this case, the HTML block is terminated by the newline — the `**hello**`
+text remains verbatim — and regular parsing resumes, with a paragraph,
+emphasised `world` and inline and block HTML following.
+
All types of [HTML blocks] except type 7 may interrupt
a paragraph. Blocks of type 7 may not interrupt a paragraph.
(This restriction is intended to prevent unwanted interpretation