Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
/* Copyright: http://textile.thresholdstate.com/ */
function span($text)
{
$qtags = array('\*\*','\*','\?\?','-','__','_','%','\+','~','\^');
$pnct = ".,\"'?!;:";
foreach($qtags as $f) {
$text = preg_replace_callback("/
(?:^|(?<=[\s>$pnct])|([{[]))
($f)(?!$f)
({$this->c})
(?::(\S+))?
([^\s$f]+|\S[^$f\n]*[^\s$f\n])
([$pnct]*)
$f
(?:$|([\]}])|(?=[[:punct:]]{1,2}|\s))
/x", array(&$this, "fSpan"), $text);
}
return $text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.