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

Constistent output of lists in html output #799

Open
m-wim opened this issue Nov 30, 2017 · 8 comments
Open

Constistent output of lists in html output #799

m-wim opened this issue Nov 30, 2017 · 8 comments

Comments

@m-wim
Copy link

m-wim commented Nov 30, 2017

Expected behaviour

If list items are separated by one or more blank lines the html output should show two separated lists (or perhaps only one)

* A
* B
* C

* D
* E
* F

should become

  • A
  • B
  • C

  • D
  • E
  • F

or

  • A
  • B
  • C
  • D
  • E
  • F

Actual behaviour

Somehow a <p> element is inserted into the <li> elements C D E F, (see my comment in #789) so it looks like

  • A
  • B

  • C

  • D

  • E

  • F

Steps to reproduce

Copy the list above

Output from the debug section in the settings dialog

Relevant log output (you have to enable enable the log widget)

@pbek
Copy link
Owner

pbek commented Nov 30, 2017

I guess that's the way the markdown library (that I don't want to hack) works. Did you try the script Markdown-it markdown parser if that suits your needs?
Or are you proposing a fix for that behavior?

@pbek
Copy link
Owner

pbek commented Nov 30, 2017

The used library is: https://github.com/hoedown/hoedown

@m-wim
Copy link
Author

m-wim commented Nov 30, 2017

I didn't use the script until now but just tried it. With the script all elements A B C D E F get the <p> tag when there are one ore more empty lines (and no <p> tag when there is no empty line).
So it looks like:

  • A

  • B

  • C

  • D

  • E

  • F

Which means there is also an inconsistency ...

@pbek
Copy link
Owner

pbek commented Nov 30, 2017

I'm not sure if there is a specification for that... If you write some text between the lists it works.

@m-wim
Copy link
Author

m-wim commented Nov 30, 2017

When the text does not start with 3 spaces - yes.
It does not flip to code style

@pbek
Copy link
Owner

pbek commented Nov 30, 2017

This is the version of the library we are using: https://github.com/pbek/QOwnNotes/tree/develop/src/libraries/hoedown

@m-wim
Copy link
Author

m-wim commented Nov 30, 2017

The Markdown-it is similar. Probably I must first get used to the (im-)possibilities of MD.
But at least I understand now a little how QOwnNotes works - so including other features like mathjax.org could be solved by the right transformation script ...

@Waqar144
Copy link
Contributor

Won't fix
Upstream problem in QTextBrowser

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

3 participants