Skip to content

Do not add newlines after block image at the end of md file #3428

@max-nextcloud

Description

@max-nextcloud

This is a follow up to #3282.

With the new block images a file that only contains an image link will have an empty line added to the end.

The markdown in question already parsed as a block image before. So theoretically it's not necessary to add an empty line after it.

I think we have the same issue with tables at the end of the doc and other block elements. In order to ensure they are not added to the following paragraph we add an empty line below. However this is not needed at the end of the file. There we want to keep an existing empty line but avoid adding new ones.

Originally posted by @max-nextcloud in #3282 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions