diff options
author | Bastien Guerry <bzg@gnu.org> | 2020-12-13 13:44:15 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@gnu.org> | 2020-12-13 13:44:15 +0100 |
commit | f22856a5c54d99867cd24c08a14bbda23d5c6229 (patch) | |
tree | b6bd688963531eccb8b9d18195df0edfc34ba59d /lisp/org/ox-texinfo.el | |
parent | 6aa9fe3e1b4052b2acde86404a90e35893ebfa00 (diff) | |
download | emacs-f22856a5c54d99867cd24c08a14bbda23d5c6229.tar.gz |
Update to Org 9.4.1
Diffstat (limited to 'lisp/org/ox-texinfo.el')
-rw-r--r-- | lisp/org/ox-texinfo.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el index 4265a85d1b2..ff4aa704b42 100644 --- a/lisp/org/ox-texinfo.el +++ b/lisp/org/ox-texinfo.el @@ -600,7 +600,8 @@ holding export options." "^@documentencoding \\(AUTO\\)$" coding (replace-regexp-in-string - "^@documentlanguage \\(AUTO\\)$" language header t nil 1) t nil 1))) + "^@documentlanguage \\(AUTO\\)$" language header t nil 1) + t nil 1))) ;; Additional header options set by #+TEXINFO_HEADER. (let ((texinfo-header (plist-get info :texinfo-header))) (and texinfo-header (org-element-normalize-string texinfo-header))) @@ -1049,13 +1050,15 @@ INFO is a plist holding contextual information. See (raw-path (org-element-property :path link)) ;; Ensure DESC really exists, or set it to nil. (desc (and (not (string= desc "")) desc)) - (path (cond - ((member type '("http" "https" "ftp")) - (concat type ":" raw-path)) - ((string= type "file") (org-export-file-uri raw-path)) - (t raw-path)))) + (path (org-texinfo--sanitize-content + (cond + ((member type '("http" "https" "ftp")) + (concat type ":" raw-path)) + ((string-equal type "file") + (org-export-file-uri raw-path)) + (t raw-path))))) (cond - ((org-export-custom-protocol-maybe link desc 'texinfo)) + ((org-export-custom-protocol-maybe link desc 'texinfo info)) ((org-export-inline-image-p link org-texinfo-inline-image-rules) (org-texinfo--inline-image link info)) ((equal type "radio") @@ -1069,8 +1072,7 @@ INFO is a plist holding contextual information. See (org-export-resolve-id-link link info)))) (pcase (org-element-type destination) (`nil - (format org-texinfo-link-with-unknown-path-format - (org-texinfo--sanitize-content path))) + (format org-texinfo-link-with-unknown-path-format path)) ;; Id link points to an external file. (`plain-text (if desc (format "@uref{file://%s,%s}" destination desc) @@ -1088,8 +1090,7 @@ INFO is a plist holding contextual information. See (_ (org-texinfo--@ref destination desc info))))) ((string= type "mailto") (format "@email{%s}" - (concat (org-texinfo--sanitize-content path) - (and desc (concat ", " desc))))) + (concat path (and desc (concat ", " desc))))) ;; External link with a description part. ((and path desc) (format "@uref{%s, %s}" path desc)) ;; External link without a description part. |