Browse Source

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.
Eric Schulte 14 years ago
parent
commit
20044297a4
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lisp/org-exp.el

+ 6 - 0
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)