Beispiel #1
0
 protected function blockHeader($Line)
 {
     $header = parent::blockHeader($Line);
     if (preg_match('/^###(?!#)/', $Line['text'])) {
         $hash = trim($Line['text'], '# ');
         $hash = preg_replace('/[^a-z\\s]+/', '', strtolower($hash));
         $hash = trim(preg_replace('/\\s+/', '-', $hash), '-');
         $header['element']['attributes']['id'] = $hash;
     }
     return $header;
 }