Bläddra i källkod

Allow subscripts and superscripts to start at bol

* lisp/org.el (org-match-substring-regexp,
  org-match-substring-with-braces-regexp): Allow subscripts and
  superscripts to start at beginning of line.
Nicolas Goaziou 13 år sedan
förälder
incheckning
8e358f2cef
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      lisp/org.el

+ 2 - 2
lisp/org.el

@@ -5020,7 +5020,7 @@ stacked delimiters is N.  Escaping delimiters is not possible."
 
 (defvar org-match-substring-regexp
   (concat
-   "\\([^\\]\\)\\([_^]\\)\\("
+   "\\([^\\]\\|^\\)\\([_^]\\)\\("
    "\\(" (org-create-multibrace-regexp "{" "}" org-match-sexp-depth) "\\)"
    "\\|"
    "\\(" (org-create-multibrace-regexp "(" ")" org-match-sexp-depth) "\\)"
@@ -5030,7 +5030,7 @@ stacked delimiters is N.  Escaping delimiters is not possible."
 
 (defvar org-match-substring-with-braces-regexp
   (concat
-   "\\([^\\]\\)\\([_^]\\)\\("
+   "\\([^\\]\\|^\\)\\([_^]\\)\\("
    "\\(" (org-create-multibrace-regexp "{" "}" org-match-sexp-depth) "\\)"
    "\\)")
   "The regular expression matching a sub- or superscript, forcing braces.")