From 699f9a5f08dbbcdef37b0eb0064bd81bed0aaffb Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sun, 6 Nov 2016 12:38:11 -0800 Subject: [PATCH 1/4] Accomodate HTML void elements Refs #435 --- spec.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/spec.txt b/spec.txt index 92faa730..ee6e5afe 100644 --- a/spec.txt +++ b/spec.txt @@ -2026,8 +2026,8 @@ the string `/>`.\ **End condition:** line is followed by a [blank line]. 7. **Start condition:** line begins with a complete [open tag] -or [closing tag] (with any [tag name] other than `script`, -`style`, or `pre`) followed only by [whitespace] +or [closing tag] (with any [tag name] other than `pre`, a [raw text element] +name, or a [void element] name followed only by [whitespace] or the end of the line.\ **End condition:** line is followed by a [blank line]. @@ -8610,6 +8610,17 @@ An [HTML tag](@) consists of an [open tag], a [closing tag], an [HTML comment], a [processing instruction], a [declaration], or a [CDATA section]. +A [raw text element](@) is one of the following elements +as [defined](http://w3c.github.io/html/syntax.html#raw-text-elements) +by the HTML spec: +`script`, `style`. + +A [void element](@) is one of the following elements +as [defined](http://w3c.github.io/html/syntax.html#void-elements) +by the HTML spec: +`area`, `base`, `br`, `col`, `embed`, `hr`, `img`, `input`, `link`, `menuitem`, +`meta`, `param`, `source`, `track`, `wbr`. + Here are some simple open tags: ```````````````````````````````` example From 3b4ec23eac5861565f8b39a9e85dd3ac62c299ea Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sun, 6 Nov 2016 13:30:47 -0800 Subject: [PATCH 2/4] Remove void elements from HTML block condition 6 --- spec.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec.txt b/spec.txt index ee6e5afe..5d44b0b2 100644 --- a/spec.txt +++ b/spec.txt @@ -2012,15 +2012,15 @@ followed by an uppercase ASCII letter.\ 6. **Start condition:** line begins the string `<` or ``, or the string `/>`.\ **End condition:** line is followed by a [blank line]. From 3f292b5108be8ac75aa0ed8b322406b42243495a Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Tue, 8 Nov 2016 11:36:10 +0000 Subject: [PATCH 3/4] Add legacy void elements to the void elements list --- spec.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec.txt b/spec.txt index 5d44b0b2..6bb80f7e 100644 --- a/spec.txt +++ b/spec.txt @@ -8621,6 +8621,10 @@ by the HTML spec: `area`, `base`, `br`, `col`, `embed`, `hr`, `img`, `input`, `link`, `menuitem`, `meta`, `param`, `source`, `track`, `wbr`. +Additionally, the following legacy HTML elements are considered void: +`basefont`, `bgsound`, `command`, `frame`, `image`, `isindex`, `keygen`, +`nextid`. + Here are some simple open tags: ```````````````````````````````` example From ac762f746f8bf15ff3ff55b0c6edc60079a970ad Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Tue, 8 Nov 2016 11:40:18 +0000 Subject: [PATCH 4/4] Remove legacy void elements from HTML block cond 6 --- spec.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec.txt b/spec.txt index 6bb80f7e..0ef214c3 100644 --- a/spec.txt +++ b/spec.txt @@ -2012,10 +2012,10 @@ followed by an uppercase ASCII letter.\ 6. **Start condition:** line begins the string `<` or `