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

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

[nongnu] elpa/markdown-mode ae1f1cb 1/2: Fix line break highlighting iss


From: ELPA Syncer
Subject: [nongnu] elpa/markdown-mode ae1f1cb 1/2: Fix line break highlighting issue at end of buffer
Date: Sat, 14 Aug 2021 14:57:25 -0400 (EDT)

branch: elpa/markdown-mode
commit ae1f1cb1658f27c1bfcf90d4b1f1022e675552c0
Author: Shohei YOSHIDA <syohex@gmail.com>
Commit: Shohei YOSHIDA <syohex@gmail.com>

    Fix line break highlighting issue at end of buffer
---
 CHANGES.md             | 2 ++
 markdown-mode.el       | 2 +-
 tests/markdown-test.el | 6 ++++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 170f4e4..b2ff60a 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -74,6 +74,7 @@
     -   Fix wrong markdown table command issue in menu [GH-639][]
     -   Fix table conversion issue [GH-639][]
     -   Fix fill paragraph issue with setext heading [GH-638][]
+    -   Fix line break highlighting issue at end of buffer [GH-621][]
 
   [gh-290]: https://github.com/jrblevin/markdown-mode/issues/290
   [gh-311]: https://github.com/jrblevin/markdown-mode/issues/311
@@ -100,6 +101,7 @@
   [gh-590]: https://github.com/jrblevin/markdown-mode/pull/590
   [gh-598]: https://github.com/jrblevin/markdown-mode/pull/598
   [gh-613]: https://github.com/jrblevin/markdown-mode/issues/613
+  [gh-621]: https://github.com/jrblevin/markdown-mode/issues/621
   [gh-622]: https://github.com/jrblevin/markdown-mode/issues/622
   [gh-625]: https://github.com/jrblevin/markdown-mode/issues/625
   [gh-631]: https://github.com/jrblevin/markdown-mode/issues/631
diff --git a/markdown-mode.el b/markdown-mode.el
index 93b5ed2..304528b 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -842,7 +842,7 @@ Group 2 matches the separating whitespace.
 Group 3 matches the text.")
 
 (defconst markdown-regex-line-break
-  "[^ \n\t][ \t]*\\(  \\)$"
+  "[^ \n\t][ \t]*\\(  \\)\n"
   "Regular expression for matching line breaks.")
 
 (defconst markdown-regex-wiki-link
diff --git a/tests/markdown-test.el b/tests/markdown-test.el
index e8506d6..35241cb 100644
--- a/tests/markdown-test.el
+++ b/tests/markdown-test.el
@@ -3176,6 +3176,12 @@ references:
     (markdown-test-range-has-face 1 9 nil)
     (markdown-test-range-has-face 10 11 'markdown-line-break-face)))
 
+(ert-deftest test-markdown-font-lock/line-break-at-end-of-buffer ()
+  "Don't apply markdown-line-break-face at end of buffer without new line.
+Details: https://github.com/jrblevin/markdown-mode/issues/621";
+  (markdown-test-string "    \nasdf  "
+    (markdown-test-range-has-face 10 11 'nil)))
+
 (ert-deftest test-markdown-font-lock/blockquote-bold ()
   "Test font lock for bold inside of a blockquote."
   (markdown-test-string



reply via email to

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