ソースを参照

ox-texinfo: Use @code instead of @verb for inline src blocks

* lisp/ox-texinfo.el (org-texinfo-inline-src-block): Use @code.
Nicolas Goaziou 8 年 前
コミット
0ff8ba5907
2 ファイル変更7 行追加3 行削除
  1. 4 0
      etc/ORG-NEWS
  2. 3 3
      lisp/ox-texinfo.el

+ 4 - 0
etc/ORG-NEWS

@@ -354,6 +354,10 @@ is now obselete.
 
 Now ~=...=~ markup uses ~@samp{}~ instead of ~@verb{}~.  You can use
 ~@verb{}~ again by customizing the variable.
+*** Texinfo exports inline src blocks as ~@code{}~
+
+It is possible to write an inline src block filter to use ~@verb{}~
+again.
 
 * Version 9.0
 

+ 3 - 3
lisp/ox-texinfo.el

@@ -873,9 +873,9 @@ See `org-texinfo-format-headline-function' for details."
   "Transcode an INLINE-SRC-BLOCK element from Org to Texinfo.
 CONTENTS holds the contents of the item.  INFO is a plist holding
 contextual information."
-  (let* ((code (org-element-property :value inline-src-block))
-	 (separator (org-texinfo--find-verb-separator code)))
-    (concat "@verb{" separator code separator "}")))
+  (format "@code{%s}"
+	  (org-texinfo--sanitize-content
+	   (org-element-property :value inline-src-block))))
 
 ;;;; Inlinetask