protected function MarkdownExtra::stripAbbreviations in Markdown 7
* Abbreviations - strips abbreviations from text, stores titles in hash * references. *
Parameters
string $text: * @return string
File
- includes/
MarkdownExtra.php, line 1718
Class
- MarkdownExtra
- Markdown Extra Parser Class
Namespace
MichelfCode
protected function stripAbbreviations($text) {
$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;
}