mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 22:47:56 +00:00
org-babel: Haskell lhs export: ensure all \[begin|end]{code} statements start at the first column
This commit is contained in:
parent
27df66d8da
commit
c0d54a9a6b
|
@ -174,6 +174,10 @@ constructs (header arguments, no-web syntax etc...) are ignored."
|
|||
(find-file tmp-tex-file)
|
||||
(goto-char (point-min)) (forward-line 2)
|
||||
(insert "%include polycode.fmt\n")
|
||||
;; ensure all \begin/end{code} statements start at the first column
|
||||
(while (re-search-forward "^[ \t]+\\\\begin{code}[^\000]+\\\\end{code}" nil t)
|
||||
(replace-match (save-match-data (org-remove-indentation (match-string 0)))
|
||||
t t))
|
||||
(setq contents (buffer-string))
|
||||
(save-buffer) (kill-buffer))
|
||||
(delete-file tmp-tex-file)
|
||||
|
|
Loading…
Reference in a new issue