forked from mirrors/org-mode
ox-md: Correctly export elements converted as HTML
* lisp/ox-md.el (org-md--identity): (org-md--convert-to-html): New functions. (md): Use new functions. Transparently export drawers. According to <https://www.markdownguide.org/basic-syntax/#html>, contents of elements converted to HTML must also be converted to HTML. Reported-by: Dominique Dumont <domi.dumont@free.fr> <http://lists.gnu.org/r/emacs-orgmode/2020-06/msg00397.html>
This commit is contained in:
parent
fe7201f52a
commit
83f5c6dcd8
|
@ -85,13 +85,17 @@ The %s will be replaced by the footnote reference itself."
|
||||||
(if a (org-md-export-to-markdown t s v)
|
(if a (org-md-export-to-markdown t s v)
|
||||||
(org-open-file (org-md-export-to-markdown nil s v)))))))
|
(org-open-file (org-md-export-to-markdown nil s v)))))))
|
||||||
:translate-alist '((bold . org-md-bold)
|
:translate-alist '((bold . org-md-bold)
|
||||||
|
(center-block . org-md--convert-to-html)
|
||||||
(code . org-md-verbatim)
|
(code . org-md-verbatim)
|
||||||
|
(drawer . org-md--identity)
|
||||||
|
(dynamic-block . org-md--identity)
|
||||||
(example-block . org-md-example-block)
|
(example-block . org-md-example-block)
|
||||||
(export-block . org-md-export-block)
|
(export-block . org-md-export-block)
|
||||||
(fixed-width . org-md-example-block)
|
(fixed-width . org-md-example-block)
|
||||||
(headline . org-md-headline)
|
(headline . org-md-headline)
|
||||||
(horizontal-rule . org-md-horizontal-rule)
|
(horizontal-rule . org-md-horizontal-rule)
|
||||||
(inline-src-block . org-md-verbatim)
|
(inline-src-block . org-md-verbatim)
|
||||||
|
(inlinetask . org-md--convert-to-html)
|
||||||
(inner-template . org-md-inner-template)
|
(inner-template . org-md-inner-template)
|
||||||
(italic . org-md-italic)
|
(italic . org-md-italic)
|
||||||
(item . org-md-item)
|
(item . org-md-item)
|
||||||
|
@ -105,7 +109,9 @@ The %s will be replaced by the footnote reference itself."
|
||||||
(property-drawer . org-md-property-drawer)
|
(property-drawer . org-md-property-drawer)
|
||||||
(quote-block . org-md-quote-block)
|
(quote-block . org-md-quote-block)
|
||||||
(section . org-md-section)
|
(section . org-md-section)
|
||||||
|
(special-block . org-md--convert-to-html)
|
||||||
(src-block . org-md-example-block)
|
(src-block . org-md-example-block)
|
||||||
|
(table . org-md--convert-to-html)
|
||||||
(template . org-md-template)
|
(template . org-md-template)
|
||||||
(verbatim . org-md-verbatim))
|
(verbatim . org-md-verbatim))
|
||||||
:options-alist
|
:options-alist
|
||||||
|
@ -279,6 +285,14 @@ INFO is a plist used as a communication channel."
|
||||||
fn-alist
|
fn-alist
|
||||||
"\n")))))
|
"\n")))))
|
||||||
|
|
||||||
|
(defun org-md--convert-to-html (datum _contents info)
|
||||||
|
"Convert DATUM into raw HTML, including contents."
|
||||||
|
(org-export-data-with-backend datum 'html info))
|
||||||
|
|
||||||
|
(defun org-md--identity (_datum contents _info)
|
||||||
|
"Return CONTENTS only"
|
||||||
|
contents)
|
||||||
|
|
||||||
|
|
||||||
;;; Transcode Functions
|
;;; Transcode Functions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue