/** * handle header tags (<h1> - <h6>) * * @param int $level 1-6 * @return void */ function handleHeader($level) { static $id = null; if ($this->parser->isStartTag) { if (isset($this->parser->tagAttributes['id'])) { $id = $this->parser->tagAttributes['id']; } } else { if (!is_null($id)) { $this->out(' {#' . $id . '}'); $id = null; } } parent::handleHeader($level); }