Skip to content

Commit

Permalink
Enable code signature to capture trailing space when in square bracke…
Browse files Browse the repository at this point in the history
…ts. [#118 state:resolved]
  • Loading branch information
jgarber committed May 30, 2009
1 parent 634a79d commit cbd7c78
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,5 +1,7 @@
=== Edge

* Enable code signature to capture trailing space when in square brackets. [Jason Garber]

* Allow emphasized phrases to include underscores. [Jason Garber]

* Include an ending question mark in a citation. [Jason Garber]
Expand Down
2 changes: 1 addition & 1 deletion ext/redcloth_scan/redcloth_inline.rl
Expand Up @@ -44,7 +44,7 @@

# markup
end_markup_phrase = (" " | PUNCT | EOF | LF) @{ fhold; };
code = "["? "@" >X mtext >A %T :> "@" "]"? ;
code = ("@" >X mtext >A %T :> "@") | ("[@" >X default+ >A %T :>> "@]") ;
script_tag = ( "<script" [^>]* ">" (default+ -- "</script>") "</script>" LF? ) >X >A %T ;
strong = "["? "*" >X mtext >A %T :> "*" "]"? ;
b = "["? "**" >X mtext >A %T :> "**" "]"? ;
Expand Down
4 changes: 4 additions & 0 deletions spec/fixtures/basic.yml
Expand Up @@ -996,3 +996,7 @@ in: |-
html: |-
<p><em>trythis</em> it will keep the empahsis.<br />
<em>and_this_too</em> it should keep the emphasis but does not with redcloth.</p>
---
name: code captures spaces when made explicit with square brackets
in: "Start a paragraph with [@p. @] (that's p, a period, and a space)."
html: "<p>Start a paragraph with <code>p. </code> (that&#8217;s p, a period, and a space).</p>"

0 comments on commit cbd7c78

Please sign in to comment.