From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou 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: Wed, 16 Sep 2015 14:51:23 +0200 Message-ID: <87h9muwmr8.fsf@nicolasgoaziou.fr> References: <8737yiuk62.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcC9v-0006gG-TD for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 08:50:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcC9r-0005CG-RJ for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 08:49:59 -0400 Received: from plane.gmane.org ([80.91.229.3]:33353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcC9r-0005Bo-KL for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 08:49:55 -0400 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZcC9p-0004lx-5v for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 14:49:53 +0200 In-Reply-To: ("Denis \=\?utf-8\?Q\?Bitouz\=C3\=A9\?\= \=\?utf-8\?Q\?\=22's\?\= message of "Mon, 14 Sep 2015 09:32:31 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Denis =?utf-8?Q?Bitouz=C3=A9?= Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org Denis Bitouz=C3=A9 write= s: > 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. I never use markdown myself. Between the two of us, you are de facto the expert. > 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 >
    >
  • >

    Foo 1:

    >
  • >
  • >

    Foo 2:

    >
      >
    • Foo 21
    • >
    • Foo 22
    • >
    >

    End of Foo 2 item.

    >
  • >
> #+end_src This is problematic. There is a rule in "ox-md" that contradicts what you are suggesting. From org-md-separate-elements's docstring: 2. In an item, remove any blank line before the very first paragraph and the next sub-list. As a consequence, we try hard to produce - Foo 2: - Foo 21 - Foo 22 instead of - Foo 2: - Foo 21 - Foo 22 which was the case in early versions of Markdown exporter. I guess we should produce the latter only when the sub-list is followed by another block element, e.g., "End of Foo 2 item". WDYT? >> 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? I'm trying to generalize the rule. Your previous suggestion applied to paragraphs. I wondered if it was the same with other block types, e.g., example blocks. Regards,