Skip to content

Commit

Permalink
Updated fix for button element and added test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
gettalong committed Oct 25, 2014
1 parent 9c9b09f commit d656641
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/kramdown/parser/html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module Constants
HTML_TAG_CLOSE_RE = /<\/(#{REXML::Parsers::BaseParser::UNAME_STR})\s*>/m
HTML_ENTITY_RE = /&([\w:][\-\w\.:]*);|&#(\d+);|&\#x([0-9a-fA-F]+);/

HTML_CONTENT_MODEL_BLOCK = %w{address applet article aside button blockquote body
HTML_CONTENT_MODEL_BLOCK = %w{address applet article aside blockquote body
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
Expand Down
7 changes: 7 additions & 0 deletions test/testcases/span/05_html/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<p><button>Some Text</button></p>

<p>First some text and then a <button>here</button></p>

<p><button>A button</button> and then text.</p>

<p>A <button>with <strong>some</strong> <code>code</code> in <img src="image.png" alt="alt" /></button> it.</p>
7 changes: 7 additions & 0 deletions test/testcases/span/05_html/button.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<button>Some Text</button>

First some text and then a <button>here</button>

<button>A button</button> and then text.

A <button>with **some** `code` in ![alt](image.png)</button> it.

0 comments on commit d656641

Please sign in to comment.