* [BUG] Markdown export of description list with nested list [9.5.2 (release_9.5.2-25-gaf6f12 @ /usr/local/share/emacs/28.1/lisp/org/)]
@ 2022-09-01 8:09 Vangelis Evangelou
2022-09-02 18:12 ` Rohit Patnaik
0 siblings, 1 reply; 3+ messages in thread
From: Vangelis Evangelou @ 2022-09-01 8:09 UTC (permalink / raw)
To: emacs-orgmode
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
The following example is not exported correctly to markdown.
- description item 1 ::
+ list 1
+ list 2
- description item 2 ::
+ list 3
+ list 4
The example consists of a description list, where each item is described
by a list. There is no text following ::. Calling
org-md-export-as-markdown gives me
- **description item 1:** - list 1
- list 2
- **description item 2:** - list 3
- list 4
when instead should give
- **description item 1:**
- list 1
- list 2
- **description item 2:**
- list 3
- list 4
The example is exported to html correctly.
Emacs : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, X toolkit,
cairo version 1.16.0, Xaw3d scroll bars)
of 2022-04-09
Package: Org mode version 9.5.2 (release_9.5.2-25-gaf6f12 @
/usr/local/share/emacs/28.1/lisp/org/)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] Markdown export of description list with nested list [9.5.2 (release_9.5.2-25-gaf6f12 @ /usr/local/share/emacs/28.1/lisp/org/)]
2022-09-01 8:09 [BUG] Markdown export of description list with nested list [9.5.2 (release_9.5.2-25-gaf6f12 @ /usr/local/share/emacs/28.1/lisp/org/)] Vangelis Evangelou
@ 2022-09-02 18:12 ` Rohit Patnaik
2022-09-03 1:11 ` Tim Cross
0 siblings, 1 reply; 3+ messages in thread
From: Rohit Patnaik @ 2022-09-02 18:12 UTC (permalink / raw)
To: Vangelis Evangelou; +Cc: emacs-orgmode
As I understand it, the bug is in `org-md-item'. It formats the tag portion of the
description with **%s**, and then simply concatenates the content. This is fine
when the content is a simple string, but when the content includes line breaks
(i.e. when content is itself a list), it doesn't realize that it needs to
include a line break between the tag and the content.
ox-html handles this case correctly because ox-html distinguishes between plain
list types, using <li> for ordered and unordered lists and <dt> & <dd> for
description lists.
I think this issue can be fixed by prefixing `contents' with a newline if `tag'
is present and `contents' itself contains multiple lines. However, this feels
like a hack, and I'd be open to better approaches.
-- Rohit
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] Markdown export of description list with nested list [9.5.2 (release_9.5.2-25-gaf6f12 @ /usr/local/share/emacs/28.1/lisp/org/)]
2022-09-02 18:12 ` Rohit Patnaik
@ 2022-09-03 1:11 ` Tim Cross
0 siblings, 0 replies; 3+ messages in thread
From: Tim Cross @ 2022-09-03 1:11 UTC (permalink / raw)
To: Rohit Patnaik; +Cc: Vangelis Evangelou, emacs-orgmode
"Rohit Patnaik" <quanticle@quanticle.net> writes:
> As I understand it, the bug is in `org-md-item'. It formats the tag portion of the
> description with **%s**, and then simply concatenates the content. This is fine
> when the content is a simple string, but when the content includes line breaks
> (i.e. when content is itself a list), it doesn't realize that it needs to
> include a line break between the tag and the content.
>
> ox-html handles this case correctly because ox-html distinguishes between plain
> list types, using <li> for ordered and unordered lists and <dt> & <dd> for
> description lists.
>
> I think this issue can be fixed by prefixing `contents' with a newline if `tag'
> is present and `contents' itself contains multiple lines. However, this feels
> like a hack, and I'd be open to better approaches.
>
> -- Rohit
I think the real issue here is that the particular version of markdown
used by org-mode (see http://daringfireball.net/projects/markdown/) does
not include support for description lists - it simply isn't part of the
supported syntax.
I"m not convinced adding support is a good idea as I suspect it will
create other complications and only reveal other syntax limitations - it
will be like pulling on a thread and could result in just unravelling
everything. As it says in the version of markdown syntax used -
| For any markup that is not covered by Markdown’s syntax, you simply use
| HTML itself. There’s no need to preface it or delimit it to indicate
| that you’re switching from Markdown to HTML; you just use the tags.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-03 1:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-01 8:09 [BUG] Markdown export of description list with nested list [9.5.2 (release_9.5.2-25-gaf6f12 @ /usr/local/share/emacs/28.1/lisp/org/)] Vangelis Evangelou
2022-09-02 18:12 ` Rohit Patnaik
2022-09-03 1:11 ` Tim Cross
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).