Example #1
0
 protected function unmarkedText($text)
 {
     $text = parent::unmarkedText($text);
     if (isset($this->DefinitionData['Abbreviation'])) {
         foreach ($this->DefinitionData['Abbreviation'] as $abbreviation => $meaning) {
             $pattern = '/\\b' . preg_quote($abbreviation, '/') . '\\b/';
             $text = preg_replace($pattern, '<abbr title="' . $meaning . '">' . $abbreviation . '</abbr>', $text);
         }
     }
     return $text;
 }
 protected function unmarkedText($text)
 {
     $text = parent::unmarkedText($text);
     if (isset($this->Definitions['Abbreviation'])) {
         foreach ($this->Definitions['Abbreviation'] as $abbreviation => $phrase) {
             $text = str_replace($abbreviation, '<abbr title="' . $phrase . '">' . $abbreviation . '</abbr>', $text);
         }
     }
     return $text;
 }