Markdownify\Converter::fixInlineElementSpacing PHP Метод

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

Examples: * leading: Text becomes Text * trailing: Text becomes Text
protected fixInlineElementSpacing ( )
    protected function fixInlineElementSpacing()
    {
        if ($this->parser->isStartTag) {
            // move spaces after the start element to before the element
            if (preg_match('~^(\\s+)~', $this->parser->html, $matches)) {
                $this->out($matches[1]);
                $this->parser->html = ltrim($this->parser->html, " \t\v");
            }
        } else {
            if (!empty($this->buffer)) {
                $str =& $this->buffer[count($this->buffer) - 1];
            } else {
                $str =& $this->output;
            }
            // move spaces before the end element to after the element
            if (preg_match('~(\\s+)$~', $str, $matches)) {
                $str = rtrim($str, " \t\v");
                $this->parser->html = $matches[1] . $this->parser->html;
            }
        }
    }