Giter VIP home page Giter VIP logo

Comments (11)

p11h avatar p11h commented on August 27, 2024 1

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;
}

from markdownviewerplusplus.

nea avatar nea commented on August 27, 2024

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

from markdownviewerplusplus.

nea avatar nea commented on August 27, 2024

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

from markdownviewerplusplus.

fmigneault avatar fmigneault commented on August 27, 2024

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

from markdownviewerplusplus.

nea avatar nea commented on August 27, 2024

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

from markdownviewerplusplus.

fmigneault avatar fmigneault commented on August 27, 2024

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.

from markdownviewerplusplus.

nea avatar nea commented on August 27, 2024

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

from markdownviewerplusplus.

crystalfp avatar crystalfp commented on August 27, 2024

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.

from markdownviewerplusplus.

nea avatar nea commented on August 27, 2024

Hey @crystalfp

Thanks for the hint.

Best

from markdownviewerplusplus.

fmigneault avatar fmigneault commented on August 27, 2024

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

from markdownviewerplusplus.

nea avatar nea commented on August 27, 2024

Glad to hear @fmigneault :)

from markdownviewerplusplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.