Falcon_Converter::heading PHP Метод

heading() защищенный Метод

Handles H1-H6, with special handling for H1 and H2
protected heading ( DOMElement $element ) : string
$element DOMElement Heading element
Результат string Text representation
    protected function heading($element)
    {
        $type = (int) substr($element->tagName, 1);
        switch ($type) {
            case 1:
                $text = trim($this->parse_children($element));
                $text .= "\n" . str_repeat("=", strlen($text));
                return $text;
            case 2:
                $text = trim($this->parse_children($element));
                $text .= "\n" . str_repeat("-", strlen($text));
                return $text;
            default:
                return str_repeat('#', $type) . ' ' . $this->parse_children($element);
        }
    }