Revision history for PreFormatter
Revision [18474]
Last edited on 2008-01-28 00:11:41 by DarTar [Modified links pointing to docs server]No Differences
Additions:
~-WantedFormatters
~-WikkaExtensibleMarkup
~-PseudoFormatters
~-SmartyPants
~-WikkaExtensibleMarkup
~-PseudoFormatters
~-SmartyPants
Deletions:
WikkaExtensibleMarkup
PseudoFormatters
Additions:
CategoryDevelopmentFormatters
Deletions:
Additions:
OK, and finally the modified smartypants itself sites in /formatters. I have changed it's tag discovery to stop matching inside "" ""{{"" and ""%%"" blocks (ensures no problems with code or actions) and no mdash markup for ""---"" or ""----"":
$SmartyPantsPHPVersion = '1.5.1cmod'; # Mon 12 Mar 2005
return ltrim($result);
$_ = preg_replace('/(?<!-)(--)(?!-)/', '—', $_); //modified to stop wrong matching of ----
array('\\', '"', ''', '.', '-', '`'), $_);
/*$match = '(?s:<!(?:--.*?--\s*)+>)|'. # comment
'(?s:<\?.*?\?\>)|'. # processing instruction
'(?:</?[\w:$]+\b(?\>[^"\'>]+|"[^"]*"|\'[^\']*\')*>)'; # regular tags*/
//This regex will stop the parser from touching anything inside these blocks:
$match = '(?:\"\")(?s:.+?)(?:\"\")|'. #escaped wiki text
'(?:\%\%)(?s:.+?)(?:\%\%)|'. #wiki code block
'(?:\{\{)(?s:.+?)(?:\}\})'; #wiki action
if ($params!==-1)
1.5.1cmod - 12 Mar 2005 - designed to work with wikka syntax, fixed bugs in code handling and wrongly marking up ----
$SmartyPantsPHPVersion = '1.5.1cmod'; # Mon 12 Mar 2005
return ltrim($result);
$_ = preg_replace('/(?<!-)(--)(?!-)/', '—', $_); //modified to stop wrong matching of ----
array('\\', '"', ''', '.', '-', '`'), $_);
/*$match = '(?s:<!(?:--.*?--\s*)+>)|'. # comment
'(?s:<\?.*?\?\>)|'. # processing instruction
'(?:</?[\w:$]+\b(?\>[^"\'>]+|"[^"]*"|\'[^\']*\')*>)'; # regular tags*/
//This regex will stop the parser from touching anything inside these blocks:
$match = '(?:\"\")(?s:.+?)(?:\"\")|'. #escaped wiki text
'(?:\%\%)(?s:.+?)(?:\%\%)|'. #wiki code block
'(?:\{\{)(?s:.+?)(?:\}\})'; #wiki action
if ($params!==-1)
1.5.1cmod - 12 Mar 2005 - designed to work with wikka syntax, fixed bugs in code handling and wrongly marking up ----
Deletions:
$SmartyPantsPHPVersion = '1.5.1c'; # Mon 13 Dec 2004
$_ = str_replace('--', '—', $_);
array('\', '"', ''', '.', '-', '`'), $_);
// $match = '(?s:<!(?:--.*?--\s*)+>)|'. # comment
// '(?s:<\?.*?\?\>)|'. # processing instruction
// '(?:</?[\w:$]+\b(?\>[^"\'>]+|"[^"]*"|\'[^\']*\')*>)'; # regular tags
$match = "(?:\"\"|\{\{|\%\%)(?s:.+?)(?:\"\"|\}\}|\%\%)"; //segments on wikka syntax
if ($params!=-1)