Browse Source

ob: allow inline src blocks to start at bol

* lisp/ob.el (org-babel-inline-src-block-regexp): Allow regexp to
  start at bol.
Nicolas Goaziou 13 năm trước cách đây
mục cha
commit
2ff74fc5b6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      lisp/ob.el

+ 1 - 1
lisp/ob.el

@@ -143,7 +143,7 @@ remove code block execution from the C-c C-c keybinding."
 (defvar org-babel-inline-src-block-regexp
   (concat
    ;; (1) replacement target (2) lang
-   "[^-[:alnum:]]\\(src_\\([^ \f\t\n\r\v]+\\)"
+   "\\(?:^\\|[^-[:alnum:]]\\)\\(src_\\([^ \f\t\n\r\v]+\\)"
    ;; (3,4) (unused, headers)
    "\\(\\|\\[\\(.*?\\)\\]\\)"
    ;; (5) body