From 20044297a4c4598aa1cae0b0285d4da03c8e6c58 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Tue, 28 Jun 2011 15:43:20 -0700 Subject: [PATCH] exp: strip protective commas from literal code blocks * lisp/org-exp.el (org-export-select-backend-specific-text): Strip protective commas from literal code blocks. --- lisp/org-exp.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index f8ea89635..0a0d112db 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1708,6 +1708,12 @@ from the buffer." (add-text-properties beg-content end-content `(org-protected t original-indentation ,ind org-native-text t)) + ;; strip protective commas + (save-excursion + (save-match-data + (goto-char beg-content) + (while (re-search-forward "^[ \t]*\\(,\\)" end-content t) + (replace-match "" nil nil nil 1)))) (delete-region (match-beginning 0) (match-end 0)) (save-excursion (goto-char beg)