diff options
author | Kaushal Modi <Kaushal.Modi@gmail.com> | 2017-12-20 17:15:52 -0500 |
---|---|---|
committer | Kaushal Modi <Kaushal.Modi@gmail.com> | 2017-12-20 17:15:52 -0500 |
commit | 6e95e088e8a3b5bd41fd6efd8c251b12f6ced61b (patch) | |
tree | 748657b583dab8c696cbac756f3841055686d310 | |
parent | 913aad68c3d91c65cf06568e3e3b0c170caf454d (diff) | |
parent | 4f3fc9cb20dc242a4b41b834e68b9ee554554307 (diff) | |
download | org-mode-6e95e088e8a3b5bd41fd6efd8c251b12f6ced61b.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/ox-md.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/ox-md.el b/lisp/ox-md.el index bd89099..9779419 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -500,14 +500,15 @@ TEXT is the string to transcode. INFO is a plist holding contextual information." (when (plist-get info :with-smart-quotes) (setq text (org-export-activate-smart-quotes text :html info))) + ;; The below series of replacements in `text' is order sensitive. + ;; Protect `, *, _, and \ + (setq text (replace-regexp-in-string "[`*_\\]" "\\\\\\&" text)) ;; Protect ambiguous #. This will protect # at the beginning of ;; a line, but not at the beginning of a paragraph. See ;; `org-md-paragraph'. (setq text (replace-regexp-in-string "\n#" "\n\\\\#" text)) ;; Protect ambiguous ! (setq text (replace-regexp-in-string "\\(!\\)\\[" "\\\\!" text nil nil 1)) - ;; Protect `, *, _ and \ - (setq text (replace-regexp-in-string "[`*_\\]" "\\\\\\&" text)) ;; Handle special strings, if required. (when (plist-get info :with-special-strings) (setq text (org-html-convert-special-strings text))) |