emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-superstar b366a40451 091/162: Allow for item bullets o


From: Stefan Kangas
Subject: [nongnu] elpa/org-superstar b366a40451 091/162: Allow for item bullets other than "*" to lack leading spaces.
Date: Fri, 31 Dec 2021 19:35:29 -0500 (EST)

branch: elpa/org-superstar
commit b366a404517f7ab2d325c59516a38d5c5cae690b
Author: D. Williams <d.williams@posteo.net>
Commit: D. Williams <d.williams@posteo.net>

    Allow for item bullets other than "*" to lack leading spaces.
    
    Thanks to @ogdenwebb for pointing this out (Issue #10).
    Also added an MWE file (temporarily) for archiving purposes.
---
 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.williams@posteo.net>
 ;; Maintainer: D. Williams <d.williams@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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]