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

Add support for Line Break Best Practices - Two or more spaces #61

Closed
Thomas-Haase opened this issue Jan 26, 2021 · 9 comments
Closed
Labels

Comments

@Thomas-Haase
Copy link

When uploading Markdown files that use two (or more) spaces at end of line to create a line break, as recommended e.g. at Line Break Best Practices, this results in Confluence pages that have no line break at this position. In fact even no whitespace at all is generated at this position, i.e. the lines are concatenated without any whitespace.
My test content was:

This is the first line.  
And this is the second line. 

This was rendered as:

This is the first line.And this is the second line.

I have tried alternatively the following scenarios, which both work as expected:

  • When inserting the same Markup content into the Confluence 'Insert markup' window, the result is rendered as expected.
  • When using <br \> instead of the two spaces, the result is as expected after uploading them with mark.
@kovetskiy kovetskiy added the bug label Feb 2, 2021
@ingydotnet
Copy link

The most important thing here is that consecutive text lines are joined without a space.

This is
the first
sentence.
And this
is the second
sentence.

is rendered as:

This isthe firstsentence.And thisis the secondsentence.

This pretty much makes the mark unusable for a ton of Markdown, at the moment.

@kovetskiy
Copy link
Owner

@ingydotnet @Thomas-Haase @chrisdavidmiles I've identified the issue, it is a regression after #53. I'll fix it soon. You can roll back to mark v4.0 to render your markdowns for now.

@ingydotnet
Copy link

@kovetskiy thanks for responding so quick!

I'll roll it back for now.

@kovetskiy
Copy link
Owner

kovetskiy commented Feb 2, 2021

@ingydotnet @Thomas-Haase would be great if you guys can try on version c22c6c1 and let me know if it works or not before I release it. I added the tests this time (the lack of tests was the root cause of all the problems actually), but still would be great to know it works on real documents.

@Thomas-Haase
Copy link
Author

Thomas-Haase commented Feb 2, 2021

Yes of course I would be happy to check this with my real documents. I can easily remove the sed workaround in my workflow, which replaces the two spaces with the HTML-ish break.
But I have no Go compiler available. I would need a binary for linux x64 to test

@ingydotnet
Copy link

@kovetskiy I can confirm that c22c6c1 works for me. Well a coworker tested that (for commit c22c6c1 and others):

foo
bar

renders to

<p>foo
bar</p>

same as 4.0, rather than the 4.1

<p>foobar</p>

@whizard
Copy link

whizard commented Feb 2, 2021

I did test it against c22c6c1 and it did the "correct" thing. When will 4.3 be released? Thanks for a great utility!

@kovetskiy
Copy link
Owner

Just released it as 5.0 since it uses the next version of the markdown compiler — blackfriday.

Docker image is also available.

@Thomas-Haase
Copy link
Author

@kovetskiy I confirm, that 5.0 fixes my issue report. You are very fast, really great, excellent tool, many thanks.
Unfortunatley I noticed an new regression in 5.0 over 4.4 in a completely different context. First I will check if my content is somehow incorrect or insane, then I will open a separate issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants