Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions external/slowparse/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
This is a version of slowparse modified for KA. It is based off this file:
https://github.com/mozilla/slowparse/blob/c0ede5d6d65c50f707b20f5036316b13bf85c80d/slowparse.js
If you want to know the KA-specific changes, I recommend you run a diff.

From:
https://github.com/mozilla/thimble.webmaker.org/tree/master/public/friendlycode/vendor/slowparse
now https://github.com/mozilla/slowparse

Released under the Mozilla Public License.
14 changes: 12 additions & 2 deletions external/slowparse/slowparse.js
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@
// http://www.w3.org/TR/html5/syntax.html#optional-tags

// HTML elements that with omittable close tag
omittableCloseTagHtmlElements: ["p", "li", "td", "th"],
omittableCloseTagHtmlElements: ["p", "li", "td", "th", "option"],

// HTML elements that paired with omittable close tag list
omittableCloseTags: {
Expand All @@ -1301,7 +1301,17 @@
"section", "table", "ul"],
"th": ["th", "td"],
"td": ["th", "td"],
"li": ["li"]
"tr": ["tr"],
"li": ["li"],
"rb": ["rb","rt","rtc","rp"],
"rt": ["rb","rt","rtc","rp"],
"rtc": ["rb","rtc","rp"],
"rp": ["rb","rt","rtc","rp"],
"optgroup": ["optgroup"],
"option": ["option"],
"thead": ["tbody", "tfoot"],
"tbody": ["tbody", "tfoot"],
"tfoot": ["tbody"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't "tr", "rb", "rt", "rtc", "rp", "optgroup", "thead", "tbody" and "tfoot" also be added to ombittableCloeTagHtmlElements?

},

// We keep a list of all valid HTML5 elements.
Expand Down