From db4c324fd3565ea8a706647375e0d365066b16a1 Mon Sep 17 00:00:00 2001 From: Yuki Izumi Date: Wed, 12 Apr 2017 16:33:12 +1000 Subject: Clarify HTML blocks re: "nested" blocks --- spec.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/spec.txt b/spec.txt index e556200..690bbb1 100644 --- a/spec.txt +++ b/spec.txt @@ -2033,6 +2033,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, `
` within a HTML block started by `` 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
+
+
+**Hello**,
+
+_world_.
+
+
+. +
+
+**Hello**,
+

world. +

+
+```````````````````````````````` + +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 -- cgit v1.2.3