diff --git a/CHANGELOG b/CHANGELOG index d8590862..2db77434 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ === Edge +* Don't add hard break after preexisting
. [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 diff --git a/ext/redcloth_scan/redcloth_inline.rl b/ext/redcloth_scan/redcloth_inline.rl index 4b8f8230..29629d3d 100644 --- a/ext/redcloth_scan/redcloth_inline.rl +++ b/ext/redcloth_scan/redcloth_inline.rl @@ -17,6 +17,7 @@ empty_tag = empty_tag_noactions >X >A %T ; end_tag = end_tag_noactions >X >A %T ; html_comment = ("") >X >A %T; + html_break = ("" LF?) >X >A %T ; # links link_text_char = (default - [ "<>]) ; @@ -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"); }; diff --git a/spec/fixtures/html.yml b/spec/fixtures/html.yml index 18f907cf..c3486537 100644 --- a/spec/fixtures/html.yml +++ b/spec/fixtures/html.yml @@ -29,6 +29,21 @@ html: |- if you break. --- +name: line breaks +desc: Explicit HTML line breaks are not double-broken +in: |- + I spoke.
+ And none replied. +html: |- +

I spoke.
+ And none replied.

+html_no_breaks: |- +

I spoke.
+ And none replied.

+lite_mode_html: |- + I spoke.
+ And none replied. +--- name: mixing of textile and XHTML in: |- test