function MarkdownExtra_Parser::stripAbbreviations in Markdown 6
Same name and namespace in other branches
- 5 markdown.php \MarkdownExtra_Parser::stripAbbreviations()
File
- ./
markdown.php, line 3188
Class
Code
function stripAbbreviations($text) {
#
# Strips abbreviations from text, stores titles in hash references.
#
$less_than_tab = $this->tab_width - 1;
# Link defs are in the form: [id]*: url "optional title"
$text = preg_replace_callback('{
^[ ]{0,' . $less_than_tab . '}\\*\\[(.+?)\\][ ]?: # abbr_id = $1
(.*) # text = $2 (no blank lines allowed)
}xm', array(
&$this,
'_stripAbbreviations_callback',
), $text);
return $text;
}