Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
max-nextcloud opened this issue Nov 15, 2022 · 1 comment · Fixed by #3445
Closed

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

max-nextcloud opened this issue Nov 15, 2022 · 1 comment · Fixed by #3445
Labels
1. to develop feature: formatting Features related to text formatting and node types feature: images format: markdown

Comments

@max-nextcloud
Copy link
Collaborator

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)

@max-nextcloud
Copy link
Collaborator Author

part of #3327

max-nextcloud added a commit that referenced this issue Nov 15, 2022
Right now we add an empty line after each image so it lives in its own paragraph.

This is not needed at the end of the file
and we should preserve the number of newlines instead (#3428).

But for now it should not block merging the block images pr #3282.

Signed-off-by: Max <[email protected]>
backportbot-nextcloud bot pushed a commit that referenced this issue Nov 15, 2022
Right now we add an empty line after each image so it lives in its own paragraph.

This is not needed at the end of the file
and we should preserve the number of newlines instead (#3428).

But for now it should not block merging the block images pr #3282.

Signed-off-by: Max <[email protected]>
mejo- pushed a commit that referenced this issue Nov 15, 2022
Right now we add an empty line after each image so it lives in its own paragraph.

This is not needed at the end of the file
and we should preserve the number of newlines instead (#3428).

But for now it should not block merging the block images pr #3282.

Signed-off-by: Max <[email protected]>
mejo- pushed a commit that referenced this issue Nov 15, 2022
Right now we add an empty line after each image so it lives in its own paragraph.

This is not needed at the end of the file
and we should preserve the number of newlines instead (#3428).

But for now it should not block merging the block images pr #3282.

Signed-off-by: Max <[email protected]>
mejo- pushed a commit that referenced this issue Nov 15, 2022
Right now we add an empty line after each image so it lives in its own paragraph.

This is not needed at the end of the file
and we should preserve the number of newlines instead (#3428).

But for now it should not block merging the block images pr #3282.

Signed-off-by: Max <[email protected]>
@max-nextcloud max-nextcloud reopened this Nov 23, 2022
@max-nextcloud max-nextcloud closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2022
@max-nextcloud max-nextcloud reopened this Nov 23, 2022
@max-nextcloud max-nextcloud changed the title Preserve number of newlines at the end of md file Do not add newlines after block image at the end of md file Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop feature: formatting Features related to text formatting and node types feature: images format: markdown
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant