emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] ox-confluence.el: Add support for verbatim & code
@ 2016-11-30 22:41 Charles Durst
  2016-12-05 21:23 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Durst @ 2016-11-30 22:41 UTC (permalink / raw)
  To: emacs-orgmode

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

--
Charles Durst
cwdurst+orgmode@gmail.com


* 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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ox-confluence.el: Add support for verbatim & code
  2016-11-30 22:41 [PATCH] ox-confluence.el: Add support for verbatim & code Charles Durst
@ 2016-12-05 21:23 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2016-12-05 21:23 UTC (permalink / raw)
  To: Charles Durst; +Cc: emacs-orgmode

Hello,

Charles Durst <cwdurst+orgmode@gmail.com> writes:

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

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-05 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-30 22:41 [PATCH] ox-confluence.el: Add support for verbatim & code Charles Durst
2016-12-05 21:23 ` Nicolas Goaziou

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).