1

When exporting an Org document to ConTeXt using Pandoc, I noticed the following.

( [org code] → PDF output )

*bold*bold
*bold,* → *bold,*

/italics/italics
/italics,/ → /italics,/

~code~code
~code,~ → ~code,~

Note that, in each case, a final comma breaks the formatting.

Is there some way of coercing the formatting into working?

(Perhaps similar to this hack for Markdown regarding code blocks and lists?)

This question seems concerned with the Emacs syntax highlighting, and so the fix is made from within Emacs; I'm using Pandoc to export the Org document to ConTeXt – so I can make finer typographical adjustments. Therefore changing Emacs' settings won't work.

digitalis_
  • 427
  • 4
  • 10

1 Answers1

2

I'm the dev maintaining pandoc's org-mode reader. There currently is no setting equivalent to org-emphasis-regexp-components in Emacs, though adding this is possible in principle. We'd need to design a way to simply and uniformly pass variables to the reader.

As for now, the workaround suggested by @digitalis_ in the comments is the best option: Just add a zero with space character (C-x 8 <RET> ZERO WIDTH SPACE) between the comma and the closing markup character. Pandoc uses the default setting for characters which are forbidden at the inner border of markup, so any use of tabs, newlines, carriage returns, simple space, comma, and single/double quotes before the closing markup prevents the sequence from being interpreted as markup.

tarleb
  • 473
  • 4
  • 7