emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Denis Bitouzé" <dbitouze-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Bug: Extra blank line in subitem list when exported to markdown [8.3.1 (8.3.1-103-g366dc4-elpa @ /home/bitouze/.emacs.d/elpa/org-20150907/)]
Date: Mon, 14 Sep 2015 09:32:31 +0200	[thread overview]
Message-ID: <m3d1xl78xc.fsf@example.com> (raw)
In-Reply-To: <8737yiuk62.fsf-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org> (Nicolas Goaziou's message of "Sun, 13 Sep 2015 22:41:09 +0200")

Le 13/09/15 à 22h41, Nicolas Goaziou <mail-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org> a écrit :

> Hello,

Hello,

> dbitouze-39ZsbGIQGT5GWvitb5QawA@public.gmane.org (Denis Bitouzé) writes:
>
>> When exported to markdown, an extra blank line is added in subitem
>> lists, as shown by the following minimal example.
>>
>> #+NAME: test.org
>> #+begin_src org
>> - Foo 1
>> - Foo2:
>>   - Foo21
>>   - Foo22
>>   End of Foo2 item.
>> #+end_src
>>
>> *Expected* behavior (note the *absence* of blank line after =Foo22=):
>>
>> #+NAME: test-ok.md
>> #+begin_src markdown
>> -   Foo 1
>> -   Foo2:
>>     -   Foo21
>>     -   Foo22
>>     End of Foo2 item.
>> #+end_src
>>
>> *Current* behavior (note the blank line after =Foo22=):
>>
>> #+NAME: test.md
>> #+begin_src markdown
>> -   Foo 1
>> -   Foo2:
>>     -   Foo21
>>     -   Foo22
>>     
>>     End of Foo2 item.
>> #+end_src
>
> Well, the rules governing blank lines in Mardown are mysterious to me.
> They are also, AFAIK, totally undocumented.

I agree.

> Anyway, you are suggesting to remove any blank line before paragraphs
> following a plain list, but only when they are already contained
> within a list.

Well, please, don't trust me too quickly :) I must admit I'm very far
from a mardown expert: I'm only a very occasional user.

> In other words, both
>
>   - Foo 1
>   - Foo 2
>
>   A paragraph
>
> and
>
>   - Foo 1
>   - Foo 2:
>     - Foo 21
>     - Foo 22
>     End of Foo 2 item.
>
> are valid examples. Am I correct? 

In fact, my suggestion was wrong: AFAICS, the last example doesn't give
the expected HTML result neither and the less bad solution for nested
lists in markdown seems to be:

#+NAME: test.md
#+begin_src markdown
-   Foo 1

-   Foo 2:

    -   Foo 21
    -   Foo 22

    End of Foo 2 item.
#+end_src

which is interpreted as (rather ugly):

#+begin_src html
<ul>
  <li>
    <p>Foo 1:</p>
  </li>
  <li>
    <p>Foo 2:</p>
    <ul>
      <li>Foo 21</li>
      <li>Foo 22</li>
    </ul>
    <p>End of Foo 2 item.</p>
  </li>
</ul>
#+end_src

> Also, what about other block types, e.g., which one is valid:
>
>   - Foo 1
>   - Foo 2:
>     - Foo 21
>     - Foo 22
>
>     #+begin_example
>     Some example
>     #+end_example
>
> or
>
>   - Foo 1
>   - Foo 2:
>     - Foo 21
>     - Foo 22
>     #+begin_example
>     Some example
>     #+end_example

I'm not sure to understand what you have in mind: are these last two
examples at org mode level?

Regards,
-- 
Denis

  parent reply	other threads:[~2015-09-14  7:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-12 14:57 Bug: Extra blank line in subitem list when exported to markdown [8.3.1 (8.3.1-103-g366dc4-elpa @ /home/bitouze/.emacs.d/elpa/org-20150907/)] Denis Bitouzé
2015-09-13 20:41 ` Nicolas Goaziou
     [not found]   ` <8737yiuk62.fsf-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org>
2015-09-14  7:32     ` Denis Bitouzé [this message]
2015-09-16 12:51       ` Nicolas Goaziou
     [not found]         ` <87h9muwmr8.fsf-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org>
2015-09-16 18:03           ` Denis Bitouzé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3d1xl78xc.fsf@example.com \
    --to=dbitouze-39zsbgiqgt5gwvitb5qawa@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).