branch: elpa/org-superstar commit 3fbfc0a47ec3a828245d0de2c1c774229af20bb8 Merge: 715a9681d3 b366a40451 Author: D. Williams <d.willi...@posteo.net> Commit: GitHub <nore...@github.com>
Merge pull request #11 from integral-dw/issue-10 Allow for item bullets other than "*" to lack leading spaces. --- org-superstar.el | 9 +++++---- tests/issue-10.org | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/org-superstar.el b/org-superstar.el index 4ebebbafe8..4b5fb97690 100644 --- a/org-superstar.el +++ b/org-superstar.el @@ -5,7 +5,7 @@ ;; Author: D. Williams <d.willi...@posteo.net> ;; Maintainer: D. Williams <d.willi...@posteo.net> ;; Keywords: faces, outlines -;; Version: 1.0.2 +;; Version: 1.0.3 ;; Homepage: https://github.com/integral-dw/org-superstar-mode ;; Package-Requires: ((org "9.1.9") (emacs "26.2")) @@ -558,11 +558,12 @@ last regexp. If there is no SUBEXPth pair, do nothing." You should not call this function to avoid confusing this mode’s cleanup routines." ;; The below regex is nicked from ‘org-list-full-item-re’, but - ;; reduced to only match simple lists. Replaced [ \t]* by [ \t]+ to - ;; avoid confusion with title bullets. + ;; reduced to only match simple lists. Changes were made to enforce + ;; a leading space before asterisks to avoid confusion with title + ;; bullets. (setq org-superstar--font-lock-keywords `(,@(when org-superstar-prettify-item-bullets - '(("^[ \t]+\\([-+*]\\) " + '(("^[ \t]*?\\(?:\\(?1:[-+]\\)\\|[ \t]\\(?1:\\*\\)\\) " (1 (org-superstar--prettify-ibullets))))) ("^\\(?3:\\**?\\)\\(?2:\\*?\\)\\(?1:\\*\\) " (1 (org-superstar--prettify-main-hbullet) prepend) diff --git a/tests/issue-10.org b/tests/issue-10.org new file mode 100644 index 0000000000..df0e8b7f3d --- /dev/null +++ b/tests/issue-10.org @@ -0,0 +1,5 @@ +This is a MWE for the bug discussed in Issue #10. + +- A. + - B. + - B.