ox-texinfo: Fix heading text

* lisp/ox-texinfo.el (org-texinfo-headline): Do not sanitize heading
  text for sectioning command.

For example

  * This is ~code~

should be possibly exported as

  @chapter This is @code{code}

not

  @chapter This is @@code@{code@}
This commit is contained in:
Nicolas Goaziou 2014-08-09 00:43:39 +02:00
parent 1faeb4e680
commit 710e40f96a

View file

@ -915,16 +915,13 @@ holding contextual information."
(level (org-export-get-relative-level headline info))
(numberedp (org-export-numbered-headline-p headline info))
(class-sectioning (assoc class org-texinfo-classes))
;; Find the index type, if any
;; Find the index type, if any.
(index (org-element-property :INDEX headline))
;; Retrieve headline text
(text (org-texinfo--sanitize-headline
(org-element-property :title headline) info))
;; Create node info, to insert it before section formatting.
;; Use custom menu title if present
;; Use custom menu title if present.
(node (format "@node %s\n" (org-texinfo--get-node headline info)))
;; Menus must be generated with first child, otherwise they
;; will not nest properly
;; will not nest properly.
(menu (let* ((first (org-export-first-sibling-p headline info))
(parent (org-export-get-parent-headline headline))
(title (org-texinfo--sanitize-headline
@ -975,10 +972,11 @@ holding contextual information."
(org-export-get-tags headline info)))
(priority (and (plist-get info :with-priority)
(org-element-property :priority headline)))
;; Retrieve headline text for structuring command.
(text (org-export-data (org-element-property :title headline) info))
;; Create the headline text along with a no-tag version. The
;; latter is required to remove tags from table of contents.
(full-text (org-texinfo--sanitize-content
(if (not (eq org-texinfo-format-headline-function 'ignore))
(full-text (if (not (eq org-texinfo-format-headline-function 'ignore))
;; User-defined formatting function.
(funcall org-texinfo-format-headline-function
todo todo-type priority text tags)
@ -990,9 +988,8 @@ holding contextual information."
text
(when tags
(format " :%s:"
(mapconcat 'identity tags ":")))))))
(mapconcat 'identity tags ":"))))))
(full-text-no-tag
(org-texinfo--sanitize-content
(if (not (eq org-texinfo-format-headline-function 'ignore))
;; User-defined formatting function.
(funcall org-texinfo-format-headline-function
@ -1001,7 +998,7 @@ holding contextual information."
(concat
(when todo (format "@strong{%s} " todo))
(when priority (format "@emph{#%c} " priority))
text))))
text)))
(pre-blanks
(make-string (org-element-property :pre-blank headline) 10)))
(cond