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

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

[nongnu] elpa/toc-org d3d3503b34 062/128: Delete trailing whitespaces fr


From: ELPA Syncer
Subject: [nongnu] elpa/toc-org d3d3503b34 062/128: Delete trailing whitespaces from links
Date: Sun, 2 Jan 2022 09:59:10 -0500 (EST)

branch: elpa/toc-org
commit d3d3503b3434bac28e04ed80ab6226edd67858e8
Author: Aziz Yemloul <azizyemloul@gmail.com>
Commit: Aziz Yemloul <azizyemloul@gmail.com>

    Delete trailing whitespaces from links
    
    It happens when headings has tags.  toc-org keep spaces and tabs between
    the end of  the heading and the  beginning of the tag to  format the toc
    links.
---
 toc-org.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/toc-org.el b/toc-org.el
index 8a049ad068..6a456d4c20 100644
--- a/toc-org.el
+++ b/toc-org.el
@@ -290,6 +290,9 @@ each heading into a link."
             (skip-chars-forward " ")
             (insert "- ")
 
+           (save-excursion
+             (delete-trailing-whitespace (point) (line-end-position)))
+
             (let* ((beg (point))
                    (end (line-end-position))
                    (heading (buffer-substring-no-properties



reply via email to

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