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

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

[elpa] externals/denote 8eea59281a 2/2: Merge pull request #99 from ppre


From: ELPA Syncer
Subject: [elpa] externals/denote 8eea59281a 2/2: Merge pull request #99 from pprevos/main
Date: Sat, 20 Aug 2022 22:57:29 -0400 (EDT)

branch: externals/denote
commit 8eea59281a699767409697e63f74d12f1d8e2563
Merge: bef859aea1 b4bbff817c
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #99 from pprevos/main
    
    Also remove leading dash when sluggifying title.
---
 denote.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/denote.el b/denote.el
index 2414a336c4..a0d825d488 100644
--- a/denote.el
+++ b/denote.el
@@ -403,9 +403,9 @@ things accordingly.")
 (defun denote--slug-hyphenate (str)
   "Replace spaces and underscores with hyphens in STR.
 Also replace multiple hyphens with a single one and remove any
-trailing hyphen."
+leading and trailing hyphen."
   (replace-regexp-in-string
-   "-$" ""
+   "^-\\|-$" ""
    (replace-regexp-in-string
     "-\\{2,\\}" "-"
     (replace-regexp-in-string "_\\|\s+" "-" str))))



reply via email to

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