Skip to content

Commit

Permalink
TexyTypographyModule: better quotes handling ('This girls's really ni…
Browse files Browse the repository at this point in the history
…ce.')
  • Loading branch information
dg committed Jun 1, 2010
1 parent cc0d29a commit fda4ec1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions texy/modules/TexyTypographyModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ public function beforeParse($texy, & $text)
'#(?<=^|[^0-9'.TEXY_CHAR.'])([\x17-\x1F]*[ksvzouiKSVZOUIA][\x17-\x1F]*)\s++(?=[\x17-\x1F]*[0-9'.TEXY_CHAR.'])#mus'
=> "\$1\xc2\xa0",

'#(?<!"|\w)"(?!\ |")([^"]++)(?<!\ |")"(?!")()#U' => $locale['doubleQuotes'][0].'$1'.$locale['doubleQuotes'][1], // double ""
'#(?<!\'|\w)\'(?!\ |\')([^\']++)(?<!\ |\')\'(?!\')()#Uu' => $locale['singleQuotes'][0].'$1'.$locale['singleQuotes'][1], // single ''
'#(?<!"|\w)"(?!\ |")((?:[^"]++|")+)(?<!\ |")"(?!["'.TEXY_CHAR.'])()#Uu' => $locale['doubleQuotes'][0].'$1'.$locale['doubleQuotes'][1], // double ""
'#(?<!\'|\w)\'(?!\ |\')((?:[^\']++|\')+)(?<!\ |\')\'(?![\''.TEXY_CHAR.'])()#Uu' => $locale['singleQuotes'][0].'$1'.$locale['singleQuotes'][1], // single ''
);

$this->pattern = array_keys($pairs);
Expand Down

0 comments on commit fda4ec1

Please sign in to comment.