From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jake Romer Subject: Re: ox-md.el: Export TOC and Footnotes as Markdown rather than HTML Date: Sat, 13 Aug 2016 13:52:56 -0400 Message-ID: References: <871t1z9ye1.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a1144ba527913370539f7acd7 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYd7Z-0003oF-Pe for emacs-orgmode@gnu.org; Sat, 13 Aug 2016 13:53:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYd7W-0006iO-53 for emacs-orgmode@gnu.org; Sat, 13 Aug 2016 13:53:20 -0400 Received: from mail-ua0-x22c.google.com ([2607:f8b0:400c:c08::22c]:34136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYd7V-0006iC-SU for emacs-orgmode@gnu.org; Sat, 13 Aug 2016 13:53:18 -0400 Received: by mail-ua0-x22c.google.com with SMTP id k90so23546074uak.1 for ; Sat, 13 Aug 2016 10:53:17 -0700 (PDT) In-Reply-To: <871t1z9ye1.fsf@saiph.selenimh> 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" To: Jake Romer , emacs-orgmode@gnu.org --001a1144ba527913370539f7acd7 Content-Type: multipart/alternative; boundary=001a1144ba527913330539f7acd5 --001a1144ba527913330539f7acd5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Nicolas, Thanks for the quick feedback! Notes on your notes: > However, AFAIU, rendering for footnote section is still HTML, albeit a > lightweight one. Ah yes, that's true=E2=80=94the enclosing section can be rendered in Markdo= wn, but the footnotes themselves (and their references) are in HTML. I think that make sense because footnotes, afaik, aren't part of "vanilla" Markdown, although some variants do support them. I think this function should not be specific to footnote section header, i.= e., > it could factor out the following code in `org-md-headline' Good point -- I implemented this in the attached revision. Ideally, this should handle the level and a scope so as to handle toc:3 or > #+TOC: headlines local. I'm not as familiar with Org's TOC facilities as I should be, so I'll update to handle these cases after some research. I want to avoid letting these patches get too big, too. Here's the patch for generating the footnotes section as Markdown, let me know what you think. Cheers, Jake On Mon, Aug 8, 2016 at 9:35 AM, Nicolas Goaziou wrote: > Hello, > > Jake Romer writes: > > > I notice that in Org 8.3, `org-md-export-as-markdown` and > > `org-md-export-to-markdown` render a document's Table of Contents and > > Footnotes sections as HTML rather than Markdown. > > Correct. > > > I have a couple of patches that change this behavior so that both are > > rendered as Markdown. I'd love to hear any thoughts or suggestions for > > improvement if you think this would be useful to include in ox-md.el. > > That's very interesting. Thank you. Some comments follow. > > However, AFAIU, rendering for footnote section is still HTML, albeit > a lightweight one. > > > From b64d21e6b5bb35b6446abf37233463e40df040c3 Mon Sep 17 00:00:00 2001 > > From: Jake Romer > > Date: Sun, 7 Aug 2016 16:04:39 -0400 > > Subject: [PATCH 1/2] Export Footnotes section as Markdown > > The commit message has to contain the name of new and modified > functions. See commit log for examples. > > > > --- > > ox-md.el | 74 ++++++++++++++++++++++++++++++ > ++++++++++++++++++++++++++++++++-- > > 1 file changed, 72 insertions(+), 2 deletions(-) > > > > diff --git a/ox-md.el b/ox-md.el > > index 0aaade6..865e123 100644 > > --- a/ox-md.el > > +++ b/ox-md.el > > @@ -50,6 +50,20 @@ This variable can be set to either `atx' or `setext'= ." > > (const :tag "Use \"atx\" style" atx) > > (const :tag "Use \"Setext\" style" setext))) > > > > +;;;; Footnotes > > + > > +(defcustom org-md-footnote-format "%s" > > + "The format for the footnote reference. > > +%s will be replaced by the footnote reference itself." > > + :group 'org-export-md > > + :type 'string) > > + > > > +(defcustom org-md-footnote-section-title "Footnotes" > > + "The title for the Footnotes section. > > +Example: `Footnotes', `References', `Sources', etc." > > + :group 'org-export-md > > + :type 'string) > > I suggest to ignore the variable above and use an equivalent of > > (org-html--translate "Table of Contents" info) > > instead. > > > +(defun org-md-footnote-section-header (info) > > + "Renders a template for the footnotes section header in the preferre= d > style. > > +INFO is used as a communication channel." > > + (let ((style (plist-get info :md-headline-style)) > > + (section-title (plist-get info :md-footnote-section-title))) > > + (cond > > + ((equal style 'atx) (format "\n%s %s\n%%s\n" "##" section-title)) > > + ((equal style 'setext) (format "\n%s\n%s\n%%s\n" > > + section-title > > + (make-string (length section-title= ) > ?-)))))) > > (if (eq style 'atx) > ... > ...) > > I think this function should not be specific to footnote section header, > i.e., it could factor out the following code in `org-md-headline' > > ;; Use "Setext" style. > ((eq style 'setext) > (concat heading tags anchor "\n" > (make-string (length heading) (if (=3D level 1) ?=3D ?-)) > "\n\n" > contents)) > ;; Use "atx" style. > (t (concat (make-string level ?#) " " heading tags anchor "\n\n" > contents)) > > > +;;;; Footnotes Section > > + > > +(defun org-md-footnote-section (info) > > + "Format the footnote section as Markdown. > > +INFO is a plist used as a communication channel." > > + (let* ((fn-alist (org-export-collect-footnote-definitions info)) > > + (fn-alist > > + (loop for (n type raw) in fn-alist collect > > + (cons n (org-trim (org-export-data raw info)))))) > > + (when fn-alist > > + (format > > + (org-md-footnote-section-header info) > > + (format > > + "\n%s\n" > > + (mapconcat > > + (lambda (fn) > > + (let ((n (car fn)) (def (cdr fn))) > > + (format > > + "%s %s\n" > > + (format > > + (plist-get info :md-footnote-format) > > + (org-html--anchor > > + (format "fn.%d" n) > > + n > > + (format " href=3D\"#fnr.%d\"" n) > > + info)) > > + def))) > > + fn-alist > > + "\n")))))) > > + > > + > > ;;;; Template > > > > (defun org-md-inner-template (contents info) > > @@ -474,7 +536,15 @@ CONTENTS is the transcoded contents string. INFO > is a plist > > holding export options." > > ;; Make sure CONTENTS is separated from table of contents and > > ;; footnotes with at least a blank line. > > - (org-trim (org-html-inner-template (concat "\n" contents "\n") info)= )) > > + (let* ((depth (plist-get info :with-toc)) > > + (headlines (and depth (org-export-collect-headlines info > depth))) > > + (toc-string (org-html-toc depth info)) > > + (toc-tail (if headlines "\n\n" "")) > > + (footnotes (org-md-footnote-section info))) > > + (org-trim (concat toc-string > > + toc-tail > > + contents > > + footnotes)))) > > > > (defun org-md-template (contents info) > > "Return complete document string after Markdown conversion. > > -- > > 2.9.2 > > > > > > From 31091e4bd4b48d1394482a1542e6d90abf04b32d Mon Sep 17 00:00:00 2001 > > From: Jake Romer > > Date: Sun, 7 Aug 2016 16:15:50 -0400 > > Subject: [PATCH 2/2] Export Table of Contents as Markdown > > This commit message is also incomplete. > > > > --- > > ox-md.el | 15 ++++++++++++++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/ox-md.el b/ox-md.el > > index 865e123..0e2a499 100644 > > --- a/ox-md.el > > +++ b/ox-md.el > > @@ -528,6 +528,19 @@ INFO is a plist used as a communication channel." > > "\n")))))) > > > > > > +;;;; Table of contents > > + > > +(defun org-md-format-toc (headline) > > Ideally, this should handethe level and a scope so as to handle toc:3 > or #+TOC: headlines local. > > > + "Return an appropriate table of contents entry for HEADLINE. > > +INFO is a plist used as a communication channel." > > + (let* ((title (org-export-data (org-export-get-alt-title headline > info) info)) > > + (level (1- (org-element-property :level headline))) > > + (indent (concat (make-string (* level 2) ? ))) > > "? " -> "?\s" > > Besides, the indentation is slightly wrong. IIRC, 4 spaces are expected > between two levels. See, e.g., `org-md-item'. > > > + (anchor (or (org-element-property :CUSTOM_ID headline) > > + (org-export-get-reference headline info)))) > > + (concat indent "- [" title "]" "(#" anchor ")"))) > > + > > + > > ;;;; Template > > > > (defun org-md-inner-template (contents info) > > @@ -538,7 +551,7 @@ holding export options." > > ;; footnotes with at least a blank line. > > (let* ((depth (plist-get info :with-toc)) > > (headlines (and depth (org-export-collect-headlines info > depth))) > > - (toc-string (org-html-toc depth info)) > > + (toc-string (or (mapconcat 'org-md-format-toc headlines "\n") > "")) > > #'org-md-format-toc > > > (toc-tail (if headlines "\n\n" "")) > > Maybe a better abstraction would be to let `org-md-format-toc' handle > toc-string and toc-tail. > > Regards, > > -- > Nicolas Goaziou > --001a1144ba527913330539f7acd5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Nicolas,

Thanks for the q= uick feedback! Notes on your notes:
=C2=A0
However, = AFAIU, rendering for footnote section is still HTML, albeit=C2=A0a lightweight one.
Ah yes, that's true=E2=80=94the enclosing section can be r= endered in Markdown, but the footnotes themselves (and their references) ar= e in HTML. I think that make sense because footnotes, afaik, aren't par= t of "vanilla" Markdown, although some variants do support them.<= /div>

I think this function should not be specific to= footnote section header,=C2=A0i.e.= , it could factor out the following code in `org-md-headline'

Good point -- I implemented this in the attac= hed revision.

Ideally, this should handle the= level and a scope so as to handle toc:3=C2=A0or #+TOC: headlines local.

I'm not as familiar with Org's TOC facilities as I should be, so = I'll update to handle these cases after some research. I want to avoid = letting these patches get too big, too.

Here's= the patch for generating the footnotes section as Markdown, let me know wh= at you think.

Cheers,

Jak= e




On Mon, Aug 8, 2016 at 9:35 AM, Ni= colas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Jake Romer <jkrmr.io@gmail.com= > writes:

> I notice that in Org 8.3, `org-md-export-as-markdown` and
> `org-md-export-to-markdown` render a document's Table of Contents = and
> Footnotes sections as HTML rather than Markdown.

Correct.

> I have a couple of patches that change this behavior so that both are<= br> > rendered as Markdown. I'd love to hear any thoughts or suggestions= for
> improvement if you think this would be useful to include in ox-md.el.<= br>
That's very interesting. Thank you. Some comments follow.

However, AFAIU, rendering for footnote section is still HTML, albeit
a lightweight one.

> From b64d21e6b5bb35b6446abf37233463e40df040c3 Mon Sep 17 00:00:00= 2001
> From: Jake Romer <jkrmr@github.= com>
> Date: Sun, 7 Aug 2016 16:04:39 -0400
> Subject: [PATCH 1/2] Export Footnotes section as Markdown

The commit message has to contain the name of new and modified
functions. See commit log for examples.
>
> ---
>=C2=A0 ox-md.el | 74 +++++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++++--
>=C2=A0 1 file changed, 72 insertions(+), 2 deletions(-)
>
> diff --git a/ox-md.el b/ox-md.el
> index 0aaade6..865e123 100644
> --- a/ox-md.el
> +++ b/ox-md.el
> @@ -50,6 +50,20 @@ This variable can be set to either `atx' or `se= text'."
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(const :tag "Use \"atx\&quo= t; style" atx)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(const :tag "Use \"Setext\&= quot; style" setext)))
>
> +;;;; Footnotes
> +
> +(defcustom org-md-footnote-format "<sup>%s</sup>&quo= t;
> +=C2=A0 "The format for the footnote reference.
> +%s will be replaced by the footnote reference itself."
> +=C2=A0 :group 'org-export-md
> +=C2=A0 :type 'string)
> +

> +(defcustom org-md-footnote-section-title "Footnotes"
> +=C2=A0 "The title for the Footnotes section.
> +Example: `Footnotes', `References', `Sources', etc."=
> +=C2=A0 :group 'org-export-md
> +=C2=A0 :type 'string)

I suggest to ignore the variable above and use an equivalent of

=C2=A0 =C2=A0(org-html--translate "Table of Contents" info)

instead.

> +(defun org-md-footnote-section-header (info)
> +=C2=A0 "Renders a template for the footnotes section header in t= he preferred style.
> +INFO is used as a communication channel."
> +=C2=A0 (let ((style (plist-get info :md-headline-style))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (section-title (plist-get info :md-footno= te-section-title)))
> +=C2=A0 =C2=A0 (cond
> +=C2=A0 =C2=A0 =C2=A0((equal style 'atx) (format "\n%s %s\n%%= s\n" "##" section-title))
> +=C2=A0 =C2=A0 =C2=A0((equal style 'setext) (format "\n%s\n%s= \n%%s\n"
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 section-title
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (make-string (leng= th section-title) ?-))))))

(if (eq style 'atx)
=C2=A0 =C2=A0 ...
=C2=A0...)

I think this function should not be specific to footnote section header, i.e., it could factor out the following code in `org-md-headline'

=C2=A0 =C2=A0 =C2=A0 =C2=A0;; Use "Setext" style.
=C2=A0 =C2=A0 =C2=A0 =C2=A0((eq style 'setext)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (concat heading tags anchor "\n"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (make-string (lengt= h heading) (if (=3D level 1) ?=3D ?-))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\n\n" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 contents))
=C2=A0 =C2=A0 =C2=A0 =C2=A0;; Use "atx" style.
=C2=A0 =C2=A0 =C2=A0 =C2=A0(t (concat (make-string level ?#) " " = heading tags anchor "\n\n"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 contents))
> +;;;; Footnotes Section
> +
> +(defun org-md-footnote-section (info)
> +=C2=A0 "Format the footnote section as Markdown.
> +INFO is a plist used as a communication channel."
> +=C2=A0 (let* ((fn-alist (org-export-collect-footnote-definitions= info))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(fn-alist
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (loop for (n type raw) in fn-alist= collect
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cons n (org-= trim (org-export-data raw info))))))
> +=C2=A0 =C2=A0 (when fn-alist
> +=C2=A0 =C2=A0 =C2=A0 (format
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0(org-md-footnote-section-header info)=
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0(format
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 "\n%s\n"
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (mapconcat
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda (fn)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let ((n (car fn)) (def (cdr= fn)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(format
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "%s %s\n"<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (format
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(plist-get inf= o :md-footnote-format)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-html--anc= hor
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (format "= ;fn.%d" n)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 n
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (format "= ; href=3D\"#fnr.%d\"" n)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 info))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 def)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fn-alist
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"\n"))))))
> +
> +
>=C2=A0 ;;;; Template
>
>=C2=A0 (defun org-md-inner-template (contents info)
> @@ -474,7 +536,15 @@ CONTENTS is the transcoded contents string.=C2=A0= INFO is a plist
>=C2=A0 holding export options."
>=C2=A0 =C2=A0 ;; Make sure CONTENTS is separated from table of contents= and
>=C2=A0 =C2=A0 ;; footnotes with at least a blank line.
> -=C2=A0 (org-trim (org-html-inner-template (concat "\n" cont= ents "\n") info)))
> +=C2=A0 (let* ((depth (plist-get info :with-toc))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(headlines (and depth (org-export-c= ollect-headlines info depth)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(toc-string (org-html-toc depth inf= o))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(toc-tail (if headlines "\n\n&= quot; ""))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(footnotes (org-md-footnote-section= info)))
> +=C2=A0 =C2=A0 (org-trim (concat toc-string
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 toc-tail
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 contents
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 footnotes))))
>
>=C2=A0 (defun org-md-template (contents info)
>=C2=A0 =C2=A0 "Return complete document string after Markdown conv= ersion.
> --
> 2.9.2
>
>
> From 31091e4bd4b48d1394482a1542e6d90abf04b32d Mon Sep 17 00:00:00= 2001
> From: Jake Romer <jkrmr@github.= com>
> Date: Sun, 7 Aug 2016 16:15:50 -0400
> Subject: [PATCH 2/2] Export Table of Contents as Markdown

This commit message is also incomplete.
>
> ---
>=C2=A0 ox-md.el | 15 ++++++++++++++-
>=C2=A0 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/ox-md.el b/ox-md.el
> index 865e123..0e2a499 100644
> --- a/ox-md.el
> +++ b/ox-md.el
> @@ -528,6 +528,19 @@ INFO is a plist used as a communication channel.&= quot;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"\n"))))))
>
>
> +;;;; Table of contents
> +
> +(defun org-md-format-toc (headline)

Ideally, this should handethe level and a scope so as to handle toc:3
or #+TOC: headlines local.

> +=C2=A0 "Return an appropriate table of contents entry for HEADLI= NE.
> +INFO is a plist used as a communication channel."
> +=C2=A0 (let* ((title (org-export-data (org-export-get-alt-title headl= ine info) info))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(level (1- (org-element-property :l= evel headline)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(indent (concat (make-string (* lev= el 2) ? )))

"? " -> "?\s"

Besides, the indentation is slightly wrong. IIRC, 4 spaces are expected
between two levels. See, e.g., `org-md-item'.

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(anchor (or (org-element-property := CUSTOM_ID headline)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0(org-export-get-reference headline info))))
> +=C2=A0 =C2=A0 (concat indent "- [" title "]" &quo= t;(#" anchor ")")))
> +
> +
>=C2=A0 ;;;; Template
>
>=C2=A0 (defun org-md-inner-template (contents info)
> @@ -538,7 +551,7 @@ holding export options."
>=C2=A0 =C2=A0 ;; footnotes with at least a blank line.
>=C2=A0 =C2=A0 (let* ((depth (plist-get info :with-toc))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(headlines (and depth (org-exp= ort-collect-headlines info depth)))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(toc-string (org-html-toc depth inf= o))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(toc-string (or (mapconcat 'org= -md-format-toc headlines "\n") ""))

#'org-md-format-toc

>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(toc-tail (if headlines "= \n\n" ""))

Maybe a better abstraction would be to let `org-md-format-toc' handle toc-string and toc-tail.

Regards,

--
Nicolas Goaziou

--001a1144ba527913330539f7acd5-- --001a1144ba527913370539f7acd7 Content-Type: application/octet-stream; name="render-fn-as-md.patch" Content-Disposition: attachment; filename="render-fn-as-md.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_irthbu2e0 RnJvbSA2M2Q5ODU0MjVkMzk5NTk4NWJkMzQwZmUxOTVkOGUyNWJkN2YyY2M2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKYWtlIFJvbWVyIDxqa3JtckBnaXRodWIuY29tPgpEYXRlOiBT YXQsIDEzIEF1ZyAyMDE2IDExOjQ1OjM0IC0wNDAwClN1YmplY3Q6IFtQQVRDSCAxLzRdIEV4dHJh Y3Qgb3JnLW1kLWhlYWRsaW5lLXRpdGxlIHRvIGdlbmVyYXRlIHRpdGxlCgpJbiBvcmRlciB0byBn ZW5lcmF0ZSBhIGhlYWRsaW5lIHRpdGxlIGluIHRoZSBwcmVmZXJyZWQgTWFya2Rvd24Kc3R5bGUg KCdhdHggb3IgJ3NldGV4dCksIEkgZXh0cmFjdGVkIHRoaXMgYml0IG9mIGxvZ2ljIGZyb20KYG9y Zy1tZC1oZWFkbGluZScuCgpTaW5jZSBgb3JnLW1kLWhlYWRsaW5lJyBkb2Vzbid0IHByb2Nlc3Mg dGhlIGhlYWRsaW5lIGZvciB0aGUgZm9vdG5vdGVzCnNlY3Rpb24sIGV4dHJhY3RpbmcgYG9yZy1t ZC1oZWFkbGluZS10aXRsZScgd2lsbCBhbGxvdyB1cyB0byBnZW5lcmF0ZQp0aGUgRm9vdG5vdGUg c2VjdGlvbiBoZWFkZXIgaW4gdGhlIHByZWZlcnJlZCBNYXJrZG93biBzdHlsZSB3aXRob3V0CmR1 cGxpY2F0aW5nIHRoZSBsb2dpYyBmb3IgZG9pbmcgc28uCg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dpdGggYXQgbGVhc3QgYSBibGFuayBsaW5lLgotICAob3JnLXRyaW0gKG9yZy1odG1sLWlubmVy LXRlbXBsYXRlIChjb25jYXQgIlxuIiBjb250ZW50cyAiXG4iKSBpbmZvKSkpCisgIChvcmctdHJp bSAoY29uY2F0CisgICAgICAgICAgICAgOzsgVGFibGUgb2YgY29udGVudHMuCisgICAgICAgICAg ICAgKGxldCAoKGRlcHRoIChwbGlzdC1nZXQgaW5mbyA6d2l0aC10b2MpKSkKKyAgICAgICAgICAg ICAgICh3aGVuIGRlcHRoIChvcmctaHRtbC10b2MgZGVwdGggaW5mbykpKQorICAgICAgICAgICAg IDs7IERvY3VtZW50IGNvbnRlbnRzLgorICAgICAgICAgICAgIGNvbnRlbnRzCisgICAgICAgICAg ICAgIlxuIgorICAgICAgICAgICAgIDs7IEZvb3Rub3RlcyBzZWN0aW9uLgorICAgICAgICAgICAg IChvcmctbWQtZm9vdG5vdGUtc2VjdGlvbiBpbmZvKSkpKQogCiAoZGVmdW4gb3JnLW1kLXRlbXBs YXRlIChjb250ZW50cyBpbmZvKQogICAiUmV0dXJuIGNvbXBsZXRlIGRvY3VtZW50IHN0cmluZyBh ZnRlciBNYXJrZG93biBjb252ZXJzaW9uLgotLSAKMi45LjIKCg== --001a1144ba527913370539f7acd7--