protected function Markdown::prepareItalicsAndBold in Markdown 7
* Prepare regular expressions for searching emphasis tokens in any * context. *
Return value
void
1 call to Markdown::prepareItalicsAndBold()
- Markdown::__construct in includes/
Markdown.php - * Constructor function. Initialize appropriate member variables. *
File
- includes/
Markdown.php, line 1282
Class
- Markdown
- Markdown Parser Class
Namespace
MichelfCode
protected function prepareItalicsAndBold() {
foreach ($this->em_relist as $em => $em_re) {
foreach ($this->strong_relist as $strong => $strong_re) {
// Construct list of allowed token expressions.
$token_relist = array();
if (isset($this->em_strong_relist["{$em}{$strong}"])) {
$token_relist[] = $this->em_strong_relist["{$em}{$strong}"];
}
$token_relist[] = $em_re;
$token_relist[] = $strong_re;
// Construct master expression from list.
$token_re = '{(' . implode('|', $token_relist) . ')}';
$this->em_strong_prepared_relist["{$em}{$strong}"] = $token_re;
}
}
}