Skip to content

Commit

Permalink
TexyTypographyModule:   after two prepositions (a v tom...)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jul 15, 2007
1 parent cdf34f1 commit 2a4c8ec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions texy-for-php4/modules/TexyTypographyModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ function begin()
'#(\d+)( ?)x\\2(\d+)\\2x\\2(\d+)#' => "\$1\xc3\x97\$3\xc3\x97\$4", // dimension sign 123 x 123 x 123
'#(\d+)( ?)x\\2(\d+)#' => "\$1\xc3\x97\$3", // dimension sign 123 x 123
'#(?<=\d)x(?= |,|.|$)#m' => "\xc3\x97", // dimension sign 123x
'#(\S ?)\(TM\)#i' => "\$1\xe2\x84\xa2", // trademark (TM)
'#(\S ?)\(TM\)#i' => "\$1\xe2\x84\xa2", // trademark (TM)
'#(\S ?)\(R\)#i' => "\$1\xc2\xae", // registered (R)
'#\(C\)( ?\S)#i' => "\xc2\xa9\$1", // copyright (C)
'#\(EUR\)#' => "\xe2\x82\xac", // Euro (EUR)
'#\(C\)( ?\S)#i' => "\xc2\xa9\$1", // copyright (C)
'#\(EUR\)#' => "\xe2\x82\xac", // Euro (EUR)
'#(\d{1,3}) (\d{3}) (\d{3}) (\d{3})#' => "\$1\xc2\xa0\$2\xc2\xa0\$3\xc2\xa0\$4", // (phone) number 1 123 123 123
'#(\d{1,3}) (\d{3}) (\d{3})#' => "\$1\xc2\xa0\$2\xc2\xa0\$3", // (phone) number 1 123 123
'#(\d{1,3}) (\d{3})#' => "\$1\xc2\xa0\$2", // number 1 123
Expand All @@ -105,12 +105,12 @@ function begin()
'#(?<=.{50})\s+(?=[\x17-\x1F]*\S{1,6}[\x17-\x1F]*$)#us' => "\xc2\xa0", // space before last short word

// nbsp space between number (optionally followed by dot) and word, symbol, punctation, currency symbol
'#(?<=^| |\.|,|-|\+|\x16)([\x17-\x1F]*\d+\.?[\x17-\x1F]*)\s+([\x17-\x1F]*[%'.TEXY_CHAR.'\x{b0}-\x{be}\x{2020}-\x{214f}])#mu'
=> "\$1\xc2\xa0\$2",
'#(?<=^| |\.|,|-|\+|\x16)([\x17-\x1F]*\d+\.?[\x17-\x1F]*)\s+(?=[\x17-\x1F]*[%'.TEXY_CHAR.'\x{b0}-\x{be}\x{2020}-\x{214f}])#mu'
=> "\$1\xc2\xa0",

// space between preposition and word
'#(?<=^|[^0-9'.TEXY_CHAR.'])([\x17-\x1F]*[ksvzouiKSVZOUIA][\x17-\x1F]*)\s+([\x17-\x1F]*[0-9'.TEXY_CHAR.'])#mus'
=> "\$1\xc2\xa0\$2",
'#(?<=^|[^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 ''
Expand Down
8 changes: 4 additions & 4 deletions texy/modules/TexyTypographyModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ public function begin()
'#(?<=.{50})\s+(?=[\x17-\x1F]*\S{1,6}[\x17-\x1F]*$)#us' => "\xc2\xa0", // space before last short word

// nbsp space between number (optionally followed by dot) and word, symbol, punctation, currency symbol
'#(?<=^| |\.|,|-|\+|\x16)([\x17-\x1F]*\d+\.?[\x17-\x1F]*)\s+([\x17-\x1F]*[%'.TEXY_CHAR.'\x{b0}-\x{be}\x{2020}-\x{214f}])#mu'
=> "\$1\xc2\xa0\$2",
'#(?<=^| |\.|,|-|\+|\x16)([\x17-\x1F]*\d+\.?[\x17-\x1F]*)\s+(?=[\x17-\x1F]*[%'.TEXY_CHAR.'\x{b0}-\x{be}\x{2020}-\x{214f}])#mu'
=> "\$1\xc2\xa0",

// space between preposition and word
'#(?<=^|[^0-9'.TEXY_CHAR.'])([\x17-\x1F]*[ksvzouiKSVZOUIA][\x17-\x1F]*)\s+([\x17-\x1F]*[0-9'.TEXY_CHAR.'])#mus'
=> "\$1\xc2\xa0\$2",
'#(?<=^|[^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 ''
Expand Down

0 comments on commit 2a4c8ec

Please sign in to comment.