Explorar o código

Revert "ox-ascii: Remove useless brackets in sub/super script"

This reverts commit 5b4215eb166554a2a358be457318c4dab5a5b55d.
Nicolas Goaziou %!s(int64=8) %!d(string=hai) anos
pai
achega
ad19484676
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      lisp/ox-ascii.el

+ 6 - 2
lisp/ox-ascii.el

@@ -1790,7 +1790,9 @@ CONTENTS is nil.  INFO is a plist holding contextual information."
   "Transcode a SUBSCRIPT object from Org to ASCII.
 CONTENTS is the contents of the object.  INFO is a plist holding
 contextual information."
-  (format (if (string-match-p "[ \t]" contents) "_{%s}" "_%s") contents))
+  (if (org-element-property :use-brackets-p subscript)
+      (format "_{%s}" contents)
+    (format "_%s" contents)))
 
 
 ;;;; Superscript
@@ -1799,7 +1801,9 @@ contextual information."
   "Transcode a SUPERSCRIPT object from Org to ASCII.
 CONTENTS is the contents of the object.  INFO is a plist holding
 contextual information."
-  (format (if (string-match-p "[ \t]" contents) "^{%s}" "^%s") contents))
+  (if (org-element-property :use-brackets-p superscript)
+      (format "^{%s}" contents)
+    (format "^%s" contents)))
 
 
 ;;;; Strike-through