Skip to content

Commit

Permalink
Merge pull request gettalong#5 from jacius/span
Browse files Browse the repository at this point in the history
span tags must have a separate closing tag to be valid HTML.
  • Loading branch information
gettalong committed Sep 24, 2011
2 parents e6c1b12 + df5e705 commit 3a72b72
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/kramdown/converter/html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def convert_dt(el, indent)
end

# A list of all HTML tags that need to have a body (even if the body is empty).
HTML_TAGS_WITH_BODY=['div', 'script', 'iframe', 'textarea', 'a'] # :nodoc:
HTML_TAGS_WITH_BODY=['div', 'span', 'script', 'iframe', 'textarea', 'a'] # :nodoc:

def convert_html_element(el, indent)
res = inner(el, indent)
Expand Down
4 changes: 3 additions & 1 deletion test/testcases/span/05_html/normal.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
<p>This is <span>tag
</span> now.</p>

<p>This is <em>something<span test="do_it" /> strange</em>.</p>
<p>This is an empty <span></span> tag.</p>

<p>This is <em>something<span test="do_it"></span> strange</em>.</p>

<p>Auto-closing: <br /></p>

Expand Down
2 changes: 2 additions & 0 deletions test/testcases/span/05_html/normal.text
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ now </span>.
This is <span>tag
</span> now.

This is an empty <span></span> tag.

This is _something<span test="do_it" /> strange_.

Auto-closing: <br>
Expand Down

0 comments on commit 3a72b72

Please sign in to comment.