Просмотр исходного кода

ox-texinfo: Fix corner case when fixing a node name

* lisp/ox-texinfo.el (org-texinfo--sanitize-node): Handle
  " (not)allowed" case.
Nicolas Goaziou 11 лет назад
Родитель
Сommit
e112f3c0df
1 измененных файлов с 4 добавлено и 5 удалено
  1. 4 5
      lisp/ox-texinfo.el

+ 4 - 5
lisp/ox-texinfo.el

@@ -487,12 +487,11 @@ guarantees the node name is unique."
 Trim string and collapse multiple whitespace characters as they
 Trim string and collapse multiple whitespace characters as they
 are not significant.  Also remove the following characters: @
 are not significant.  Also remove the following characters: @
 { } ( ) : . ,"
 { } ( ) : . ,"
-  (org-trim
+  (replace-regexp-in-string
+   "[:,.]" ""
    (replace-regexp-in-string
    (replace-regexp-in-string
-    "[:,.]" ""
-    (replace-regexp-in-string
-     "\\`(\\(.*)\\)" "[\\1"
-     (replace-regexp-in-string "[ \t]\\{2,\\}" " " title)))))
+    "\\`(\\(.*)\\)" "[\\1"
+    (org-trim (replace-regexp-in-string "[ \t]\\{2,\\}" " " title)))))
 
 
 ;;;; Content sanitizing
 ;;;; Content sanitizing