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

In numbered list unneeded newline after item number #47

Closed
crystalfp opened this issue Oct 3, 2017 · 16 comments
Closed

In numbered list unneeded newline after item number #47

crystalfp opened this issue Oct 3, 2017 · 16 comments

Comments

@crystalfp
Copy link

Rendering a simple numbered list with a blank line between items gives (on screen and in pdf but not in html) an unwanted newline after the item number (see first screen capture below). Instead, without blank line gives the correct list rendering (see second screen capture below).
Bug or feature?
Thanks for looking!
mario

capture1
capture2

@nea
Copy link
Owner

nea commented Oct 4, 2017

Hey @crystalfp

You are not the first seeing this issue but it is not affecting everyone. I have one colleague seeing the same, another facing no issues, same as me.

I will have to put some time into this.

Sorry

@DavidBruchmann
Copy link

When exported to HTML the fault is not visible, but when exported to PDF.
In HTML it still could be influenced easily by CSS anyway ...
Just tested with the x86 Version on 64b-Windows-7, UTF-8 and different line-breaks (CR, LF, CR LF).

@DavidBruchmann
Copy link

Example-Image with "display all characters" shows that after the list there is an issue too.

screenshot_md_notepad

@nea
Copy link
Owner

nea commented Oct 5, 2017

Hi @DavidBruchmann

What do you mean with "after the list is an issue"? If you mean that there is no line break: that is by CommonMark specification and standard. After a list, two spaces are not enough to line break but only a complete new line to result in a spacing between list and new line.

Best

@DavidBruchmann
Copy link

If I'm not wrong the list should end before line three because lines 3 and 4 are not indented.

@nea
Copy link
Owner

nea commented Oct 5, 2017

Hi @DavidBruchmann

As you can check yourself, it doesn't depend on line indentation in this case but real line breaks. You can test it yourself here: http://spec.commonmark.org/dingus/?text=-%20a%0A-%20b%0A%0A%20%20%5Bref%5D%3A%20%2Furl%0A-%20d%0A

This is an example based on the implemented spec 0.27.

Best

@DavidBruchmann
Copy link

DavidBruchmann commented Oct 5, 2017

Hi @nea,

ok, it seems that to end a list I've to make two "real" linebreaks. If only one the next line is still seen as part of the list.
http://spec.commonmark.org/dingus/?text=-%20a%0A-%20b%20%20%0Acvb%0A%0A%20%20%5Bref%5D%3A%20%2Furl%0A-%20d%0A

Greets,
David

@Stevoisiak
Copy link

Stevoisiak commented Jan 10, 2018

I've encountered a similar issue (#57) when adding lists and reference-styled URLs.

- Hyperlink to [Google.com][1]

  [1]: https://www.google.com/

Reference-styled URL/list issue

@nkaleidoskop
Copy link

I also consistently see this bug whenever there are two lists separated by a blank line.

* foo
* bar

* cat

Creating a non-list-line between the lists prevents the bug.

Surprisingly, the following will not trigger the bug (note the different bullet point):

* foo
* bar

- cat

Hope this helps with finding the bug!

@nea
Copy link
Owner

nea commented Feb 15, 2018

Hi @crystalfp, @Stevoisiak

I just released a new version 0.8.0.

Could you please check if this issue still occurs?

Thanks a lot

@crystalfp
Copy link
Author

Seems fixed in 0.8.0 but only if you do not leave an empty line between list entries.
Here is an example:

Approfondiamo.

1. Vi ho trovato paralleli.

2. Ho visto i risultati.

3. C'è il mio interesse.

Voglio provare.

- 001 piano

- 002 la premessa

- 003 questi paralleli

If you remove the empty lines between the list items the rendering is perfect.

@nea
Copy link
Owner

nea commented Feb 19, 2018

Hey @crystalfp and thanks for cheking

Please refer to #39 (comment) why this happens because of the loose lists.

Thanks

@nea nea closed this as completed Feb 19, 2018
@Stevoisiak
Copy link

Stevoisiak commented Mar 6, 2018

@nea The spacing bug still occurs in 0.8.1 if a code-block is inserted after a list item.

Sample .MD file

- List item followed by code block

        print("Hello, world!")

Appearance on GitHub

  • List item followed by code block

      print("Hello, world!")
    

Appearance in MarkdownViewer++

MarkdownViewer++: Spacing bug with bulleted list and code block

@nea
Copy link
Owner

nea commented Mar 6, 2018

Hi @Stevoisiak

It is a loose list why this behaviour occurs. I haven't changed or fixed anything in this regard as it mainly works as implemented but not as expected ^^

Best

@Stevoisiak
Copy link

@nea Should I open a separate issue report for this?

@nea
Copy link
Owner

nea commented Mar 6, 2018

Hi @Stevoisiak

You can but this is nothing I can tackle very soon as this depends on the background HTMLRendering, which is not further developed at the moment and would require me to step in there, when I find time.

Sorry

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

No branches or pull requests

5 participants