Skip to content

<br /> two spaces added before line break #45

@francoisjacquet

Description

@francoisjacquet

Hello,

I am wondering why Markdownify is adding two spaces before the \n line break when converting <br /> tags?

https://github.com/Elephant418/Markdownify/blob/master/src/Converter.php#L1056

    /**
     * handle <br /> tags
     *
     * @param void
     * @return void
     */
    protected function handleTag_br()
    {
        $this->out("  \n" . $this->indent, true);
        $this->parser->html = ltrim($this->parser->html);
    }

Is it safe remove them? (Did some tests and did not have any error)

       $this->out("\n" . $this->indent, true);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions