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

problems displaying lists #39

Closed
fmigneault opened this issue Jun 1, 2017 · 11 comments
Closed

problems displaying lists #39

fmigneault opened this issue Jun 1, 2017 · 11 comments
Assignees

Comments

@fmigneault
Copy link

Using bullet lists sometimes causes issues as displayed in the following image:

(1) Bullets are 1 line above the corresponding paragraph text (ie: some '\n' added before the text?)
(2) Random numbers appear in before indented paragraphs or indented paragraphs with bullet list.

image

@nea
Copy link
Owner

nea commented Jun 2, 2017

Hey @kenjikyo

Yeah, some colleagues of mine have face a similar issue sometimes but there wasn't a real reproducible test case so far. But I have to look into this.

Regarding the numbers: It seems it interprets the first name abbreviations such as "F." as a new numbered list. Don't know why ^^ Will check.
Line breaks in a list with indented second lines in general is something making problems sometimes.

Thanks

@p11h
Copy link

p11h commented Jun 2, 2017

Regarding paragraphs in lists; these are Loose lists, which according to the CommonMark Spec:

A list is loose if any of its constituent list items are separated by blank lines, or if any of its constituent list items directly contain two block-level elements with a blank line between them. Otherwise a list is tight. (The difference in HTML output is that paragraphs in a loose list are wrapped in <p> tags, while paragraphs in a tight list are not.)

One option for handling this is using CSS to remove the margins from the paragraphs within list items, for example:

li p {
  margin-top: 0;
  margin-bottom: 0;
}

@nea
Copy link
Owner

nea commented Feb 15, 2018

Hey @fmigneault

Sorry for the long delay but I just released 0.8.0.

Could you please try to reproduce with the newest version?

Thanks a lot

@fmigneault
Copy link
Author

I have version 0.8.0.4052 installed.
I still have the same output as in the initial image.

@nea nea added the bug label Feb 16, 2018
@nea nea self-assigned this Feb 16, 2018
@nea
Copy link
Owner

nea commented Feb 16, 2018

Hey @fmigneault

It is exactly as @stezmi stated. The result are loose lists with paragraphs because of the space between the list items. His CSS fix would be one to quickly apply for now.

As the HTML Renderer is not actively developed anymore I will take a look on how to tackle it.

Best

@nea nea added the quickfix label Feb 16, 2018
@fmigneault
Copy link
Author

I have tried the CSS proposition by @stezmi
It correctly fixes the issue of the paragraph space for block list items.

The 2nd issue of my first post (random numbers) is still present though.

@nea
Copy link
Owner

nea commented Feb 19, 2018

Hey @fmigneault

The "numbering" issue is actually interpreting F.

A., B., C. etc. would be a numbered list, therefore F. equals 6, as the row starts with it and it is not in the middle of a sentence.

You can escape the dot signaling a list i.e. F\. Comachi.

Best

@crystalfp
Copy link

0.8.0 + the CSS two liner, solved the problem for loose and tight lists.

Just a suggestion. In the "Options" dialog seems the CSS fragment is applied only to HTML export, not to the rendering inside Npp. Maybe just adding after "Custom CSS" the following "(used for internal rendering and HTML export)" could help.

@nea
Copy link
Owner

nea commented Feb 19, 2018

Hey @crystalfp

Thanks for the hint.

Best

@fmigneault
Copy link
Author

@nea wow well spotted about the numbering letter interpretation. I didn't think about that. Indeed resolved with escaping the characters.
Thanks!

@nea
Copy link
Owner

nea commented Feb 26, 2018

Glad to hear @fmigneault :)

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

No branches or pull requests

4 participants