emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] ox-confluence.el: Add support for verbatim & code


From: Charles Durst
Subject: [O] [PATCH] ox-confluence.el: Add support for verbatim & code
Date: Wed, 30 Nov 2016 17:41:22 -0500

A tiny patch to improve text formatting support for exporting to
Confluence wiki-markup.

--
Charles Durst
address@hidden


* contrib/lisp/ox-confluence.el (org-confluence-verbatim,
  org-confluence-code): New functions.

Convert org-mode =verbatim= and ~code~ into Confluence {{monospace}}.

TINYCHANGE
---
 contrib/lisp/ox-confluence.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/contrib/lisp/ox-confluence.el b/contrib/lisp/ox-confluence.el
index 48bc5ea..bbdc58a 100644
--- a/contrib/lisp/ox-confluence.el
+++ b/contrib/lisp/ox-confluence.el
@@ -41,6 +41,8 @@
   :translate-alist '((bold . org-confluence-bold)
      (example-block . org-confluence-example-block)
      (fixed-width . org-confluence-fixed-width)
+     (verbatim . org-confluence-verbatim)
+     (code . org-confluence-code)
      (footnote-definition . org-confluence-empty)
      (footnote-reference . org-confluence-empty)
      (headline . org-confluence-headline)
@@ -86,6 +88,12 @@
 (defun org-confluence-fixed-width (fixed-width contents info)
   (format "\{\{%s\}\}" contents))

+(defun org-confluence-verbatim (verbatim contents info)
+  (format "\{\{%s\}\}" (org-element-property :value verbatim)))
+
+(defun org-confluence-code (code contents info)
+  (format "\{\{%s\}\}" (org-element-property :value code)))
+
 (defun org-confluence-headline (headline contents info)
   (let ((low-level-rank (org-export-low-level-p headline info))
         (text (org-export-data (org-element-property :title headline)
-- 
2.5.4 (Apple Git-61)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]