mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 08:18:50 +00:00
LaTeX export: Avoid infinite loop when environment is not closed
This commit is contained in:
parent
de00dfb952
commit
b85b2e1f19
|
@ -3,6 +3,8 @@
|
|||
* org-latex.el (org-export-latex-quotation-marks): Fix export of
|
||||
quotation makrs in parenthesis.
|
||||
(org-remove-initial-hash): New function.
|
||||
(org-export-latex-preprocess): Fix bug with infinite loop if
|
||||
environment is not properly closed.
|
||||
|
||||
* org-table.el (org-table-get-remote-range): Find #+TBLNAME also
|
||||
when indented.
|
||||
|
|
|
@ -1542,13 +1542,14 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
|||
(goto-char (point-min))
|
||||
(while (re-search-forward "^[ \t]*\\\\begin{\\([a-zA-Z]+\\*?\\)}" nil t)
|
||||
(let* ((start (progn (beginning-of-line) (point)))
|
||||
(end (or (and (re-search-forward
|
||||
(concat "^[ \t]*\\\\end{"
|
||||
(regexp-quote (match-string 1))
|
||||
"}") nil t)
|
||||
(point-at-eol))
|
||||
(point-max))))
|
||||
(add-text-properties start end '(org-protected t))))
|
||||
(end (and (re-search-forward
|
||||
(concat "^[ \t]*\\\\end{"
|
||||
(regexp-quote (match-string 1))
|
||||
"}") nil t)
|
||||
(point-at-eol))))
|
||||
(if end
|
||||
(add-text-properties start end '(org-protected t))
|
||||
(goto-char (point-at-eol))))))
|
||||
|
||||
;; Preserve math snippets
|
||||
|
||||
|
|
Loading…
Reference in a new issue