Skip to content

Commit

Permalink
Recognize deleted phrases when they start at the beginning of a line. [
Browse files Browse the repository at this point in the history
…#83 state:resolved]
  • Loading branch information
jgarber committed Feb 11, 2009
1 parent 6b6b091 commit 241a311
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,5 +1,7 @@
=== Edge

* Recognize deleted phrases when they start at the beginning of a line. #83

* Fix escaped <code> tag when it has the class attribute and is in a <pre> tag. #95

* Fix dimensions and primes for LaTeX. #103
Expand Down
2 changes: 1 addition & 1 deletion ext/redcloth_scan/redcloth_inline.rl
Expand Up @@ -38,7 +38,7 @@
i = "["? "__" >X mtext >A %T :> "__" "]"? ;
del = "[-" >X C ( mtext ) >A %T :>> "-]" ;
emdash_parenthetical_phrase_with_spaces = " -- " mtext " -- " ;
del_phrase = (( " " >A %{ STORE("beginning_space"); } "-") >X C ( mtext ) >A %T :>> ( "-" end_markup_phrase )) - emdash_parenthetical_phrase_with_spaces ;
del_phrase = (( " " >A %{ STORE("beginning_space"); } "-" | "-" when starts_line) >X C ( mtext ) >A %T :>> ( "-" end_markup_phrase )) - emdash_parenthetical_phrase_with_spaces ;
ins = "["? "+" >X mtext >A %T :> "+" "]"? ;
sup = "[^" >X mtext >A %T :> "^]" ;
sup_phrase = ( "^" when starts_phrase) >X ( mtext ) >A %T :>> ( "^" end_markup_phrase ) ;
Expand Down
6 changes: 5 additions & 1 deletion test/basic.yml
Expand Up @@ -272,7 +272,11 @@ html: <p>Please email why@domain.com or jason@domain.com.</p>
name: del
desc: To indicate a passage which has been deleted, surround the passage with hypens.
in: I'm -sure- not sure.
html: <p>I&#8217;m <del>sure</del> not sure.</p>
html: "<p>I&#8217;m <del>sure</del> not sure.</p>"
---
name: del beginning a phrase
in: -delete-
html: "<p><del>delete</del></p>"
---
name: ins
desc: Pluses around a passage indicate its insertion.
Expand Down

0 comments on commit 241a311

Please sign in to comment.