ソースを参照

org-latex.el: match horizontal rules with HTML regexp

Also a slight update of the manual about horizontal rules.
Valentin Wüstholz 14 年 前
コミット
39d5acd33c
2 ファイル変更3 行追加3 行削除
  1. 2 2
      doc/org.texi
  2. 1 1
      lisp/org-latex.el

+ 2 - 2
doc/org.texi

@@ -8688,8 +8688,8 @@ syntax; it is exported verbatim.
 @node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements
 @subheading  Horizontal rules
 @cindex horizontal rules, markup rules
-A line consisting of only dashes, and at least 5 of them, will be
-exported as a horizontal line (@samp{<hr/>} in HTML).
+A line consisting of only dashes, and at least 5 of them, will be exported as
+a horizontal line (@samp{<hr/>} in HTML and @code{\hrule} in @LaTeX{}).
 
 @node Comment lines,  , Horizontal rules, Structural markup elements
 @subheading Comment lines

+ 1 - 1
lisp/org-latex.el

@@ -2270,7 +2270,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
 
   ;; Convert horizontal rules
   (goto-char (point-min))
-  (while (re-search-forward "^----+.$" nil t)
+  (while (re-search-forward "^[ \t]*-\\{5,\\}[ \t]*$" nil t)
     (org-if-unprotected
      (replace-match (org-export-latex-protect-string "\\hrule") t t)))