Skip to content

Commit

Permalink
Removed indication of quotes explicitly with square brackets.
Browse files Browse the repository at this point in the history
Textile 2.0 does not support this and it wasn't in RedCloth 3. [#46 state:resolved]
  • Loading branch information
jgarber committed Sep 16, 2008
1 parent b34b06f commit e27c9d3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Expand Up @@ -4,6 +4,8 @@

* Fixed missed caps and inline modifiers wrapped in parentheses. #43, #45

* Removed indication of quotes explicitly with square brackets. Textile 2.0 does not support this and it wasn't in RedCloth 3. #46


*4.0.3 (August 18, 2008)*

Expand Down
2 changes: 1 addition & 1 deletion ext/redcloth_scan/redcloth_common.rl
Expand Up @@ -40,7 +40,7 @@
N_CONT = "_" %{ list_continue = 1; };
N_NUM = digit+ >A %{ STORE(start) };
N = ( N_CONT | N_NUM )? ;
PUNCT = ( "!" | '"' | "#" | "$" | "%" | "&" | "'" | "," | "-" | "." | "/" | ":" | ";" | "=" | "?" | "\\" | "^" | "`" | "|" | "~" | "[" | "(" | ")" | "<" ) ;
PUNCT = ( "!" | '"' | "#" | "$" | "%" | "&" | "'" | "," | "-" | "." | "/" | ":" | ";" | "=" | "?" | "\\" | "^" | "`" | "|" | "~" | "[" | "]" | "(" | ")" | "<" ) ;
dotspace = ("." " "*) ;
indent = [ \t]* ;

Expand Down
4 changes: 2 additions & 2 deletions ext/redcloth_scan/redcloth_inline.rl
Expand Up @@ -52,8 +52,8 @@
cite = "["? "??" >X mtext >A %T :> "??" "]"? ;
ignore = "["? "==" >X %A mtext %T :> "==" "]"? ;
snip = "["? "```" >X %A mtext %T :> "```" "]"? ;
quote1 = "["? "'" >X %A mtext %T :> "'" "]"? ;
quote2 = "["? '"' >X %A mtext %T :> '"' "]"? ;
quote1 = "'" >X %A mtext %T :> "'" ;
quote2 = '"' >X %A mtext %T :> '"' ;

# html
start_tag = ( "<" Name space+ AttrSet* (AttrEnd)? ">" | "<" Name ">" ) >X >A %T ;
Expand Down
10 changes: 9 additions & 1 deletion test/basic.yml
Expand Up @@ -829,4 +829,12 @@ in: |-
html: |-
<p>__Amanita__s are mushrooms.<br />
Lungworts (<i>Lobaria</i>) are lichens.<br />
Blah blah (normal text <b>bold</b>) blah.</p>
Blah blah (normal text <b>bold</b>) blah.</p>
---
name: square brackets are preserved
in: |-
citation ["(Berk.) Hilton"], see
[Papers "blah blah."]
html: |-
<p>citation [&#8220;(Berk.) Hilton&#8221;], see<br />
[Papers &#8220;blah blah.&#8221;]</p>

0 comments on commit e27c9d3

Please sign in to comment.