Skip to content

Commit

Permalink
Don't add hard break after preexisting <br />. [#130 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber committed May 26, 2009
1 parent dd71f06 commit 56bd020
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,5 +1,7 @@
=== Edge

* Don't add hard break after preexisting <br />. [Jason Garber]

* Change to list attributes so you can give style/class to list items (taken from PyTextile). Breaks backwards compatibility.

Before, the style applied to the first list item applied to the entire list. Now, class/id/style placed
Expand Down
2 changes: 2 additions & 0 deletions ext/redcloth_scan/redcloth_inline.rl
Expand Up @@ -17,6 +17,7 @@
empty_tag = empty_tag_noactions >X >A %T ;
end_tag = end_tag_noactions >X >A %T ;
html_comment = ("<!--" (default+) :>> "-->") >X >A %T;
html_break = ("<br" space* AttrSet* (AttrEnd)? "/"? ">" LF?) >X >A %T ;

# links
link_text_char = (default - [ "<>]) ;
Expand Down Expand Up @@ -150,6 +151,7 @@
end_tag { INLINE(block, "inline_html"); };
empty_tag { INLINE(block, "inline_html"); };
html_comment { INLINE(block, "inline_html"); };
html_break { INLINE(block, "inline_html"); };

redcloth_version { INLINE(block, "inline_redcloth_version"); };

Expand Down
15 changes: 15 additions & 0 deletions spec/fixtures/html.yml
Expand Up @@ -29,6 +29,21 @@ html: |-
if you break.</li>
</ul>
---
name: line breaks
desc: Explicit HTML line breaks are not double-broken
in: |-
I spoke.<br />
And none replied.
html: |-
<p>I spoke.<br />
And none replied.</p>
html_no_breaks: |-
<p>I spoke.<br />
And none replied.</p>
lite_mode_html: |-
I spoke.<br />
And none replied.
---
name: mixing of textile and XHTML
in: |-
<img src="test.jpg" alt="test" />
Expand Down

0 comments on commit 56bd020

Please sign in to comment.