Skip to content

Commit

Permalink
Added <details> and <summary> tags to list of HTML elements with bloc…
Browse files Browse the repository at this point in the history
…k content model (fixes #155)

Note that the <summary> element was using the span content model
prior to this change but the block content model is better
suited (both are allowed by the HTML5 spec).
  • Loading branch information
gettalong committed Sep 9, 2014
1 parent 2b20811 commit 97286cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/kramdown/parser/html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ module Constants
HTML_ENTITY_RE = /&([\w:][\-\w\.:]*);|&#(\d+);|&\#x([0-9a-fA-F]+);/

HTML_CONTENT_MODEL_BLOCK = %w{address applet article aside button blockquote body
dd div dl fieldset figure figcaption footer form header hgroup iframe li map menu nav
noscript object section td}
dd details div dl fieldset figure figcaption footer form header hgroup iframe li map menu nav
noscript object section summary td}
HTML_CONTENT_MODEL_SPAN = %w{a abbr acronym b bdo big button cite caption del dfn dt em
h1 h2 h3 h4 h5 h6 i ins label legend optgroup p q rb rbc
rp rt rtc ruby select small span strong sub sup summary th tt}
rp rt rtc ruby select small span strong sub sup th tt}
HTML_CONTENT_MODEL_RAW = %w{script style math option textarea pre code kbd samp var}
# The following elements are also parsed as raw since they need child elements that cannot
# be expressed using kramdown syntax: colgroup table tbody thead tfoot tr ul ol
Expand Down

0 comments on commit 97286cd

Please sign in to comment.