Bug 470545 - definition lists not supported
Summary: definition lists not supported
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: markdown backend (show other bugs)
Version: 23.04.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-02 05:17 UTC by johnathan
Modified: 2023-06-11 09:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
markdown file (164 bytes, text/markdown)
2023-06-02 05:17 UTC, johnathan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johnathan 2023-06-02 05:17:00 UTC
Created attachment 159409 [details]
markdown file

SUMMARY
***
 definition lists are supported by some markdown editors and viewers, it looks like okular does not support the same.

https://www.markdownguide.org/extended-syntax/#definition-lists

```
First Term
: This is the definition of the first term.

Second Term
: This is one definition of the second term.
: This is another definition of the second term.

```
STEPS TO REPRODUCE
1.  open the attached file in okular
2.   compare with https://stackedit.io/app# or https://dillinger.io/
3. 

OBSERVED RESULT
 rendering is not made properly

EXPECTED RESULT
just like the websites, the output should be rendered

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Albert Astals Cid 2023-06-10 19:19:06 UTC
For markdown support we're using a library called discount.

That seems to be a problem in their implementation, you can check that by running the 

mkd2html yourfile.md

command and seeing that the generated html is not like you want it.

There's nothing we can fix here. Please report this to the discount developers at https://github.com/Orc/discount/issues and when they fix it it will immediately work in Okular.
Comment 2 johnathan 2023-06-11 04:54:39 UTC
(In reply to Albert Astals Cid from comment #1)
> For markdown support we're using a library called discount.
> 
> That seems to be a problem in their implementation, you can check that by
> running the 
> 
> mkd2html yourfile.md
> 
> command and seeing that the generated html is not like you want it.
> 
> There's nothing we can fix here. Please report this to the discount
> developers at https://github.com/Orc/discount/issues and when they fix it it
> will immediately work in Okular.

Hey. i checked their documentation and they seem to support definition lists. 
https://www.pell.portland.or.us/~orc/Code/discount/#v2.0.4

 In discount 2.0.4 I extended the definition list syntax to allow php markdown extra definition lists which means that source like

 tag1
 : data

now generates

 <dt>tag1</dt>
 <dd>data</dd>


this is the functionality that i am saying is not present in okular. maybe our version is behind 2.0.4? can i know the version of library used in okular?

can you confirm the file or your own file against documentation of discount regarding definition lists?
Comment 3 Albert Astals Cid 2023-06-11 09:25:53 UTC
 > can i know the version of library used in okular?

we do not ship any library of the version, this is shipped by Linux whatever distribution you are using (you dind't say) so use your distribution tools to ask which discount version is installed.

> can you confirm the file or your own file against documentation of discount regarding definition lists?

I told you exactly that by running the

mkd2html yourfile.md

command you can check that the generated html file is not what you want. You can check that by yourself.