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

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

[nongnu] elpa/markdown-mode 348b601 1/2: Fix highlighting URL which cont


From: ELPA Syncer
Subject: [nongnu] elpa/markdown-mode 348b601 1/2: Fix highlighting URL which contains comma or parenthesis issue
Date: Wed, 18 Aug 2021 21:57:30 -0400 (EDT)

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

    Fix highlighting URL which contains comma or parenthesis issue
---
 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 b2ff60a..aa1aa9a 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -75,6 +75,7 @@
     -   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][]
+    -   Fix URL highlighting which contains comma or parentheis [GH-649][]
 
   [gh-290]: https://github.com/jrblevin/markdown-mode/issues/290
   [gh-311]: https://github.com/jrblevin/markdown-mode/issues/311
@@ -111,6 +112,7 @@
   [gh-639]: https://github.com/jrblevin/markdown-mode/issues/639
   [gh-640]: https://github.com/jrblevin/markdown-mode/issues/640
   [gh-641]: https://github.com/jrblevin/markdown-mode/issues/641
+  [gh-649]: https://github.com/jrblevin/markdown-mode/issues/649
 
 # Markdown Mode 2.4
 
diff --git a/markdown-mode.el b/markdown-mode.el
index 304528b..35c2f07 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -861,7 +861,7 @@ Group 5 matches the second component of the wiki link, when 
present.
 Group 6 matches the closing square brackets.")
 
 (defconst markdown-regex-uri
-  (concat "\\(" (regexp-opt markdown-uri-types) ":[^]\t\n\r<>,;() ]+\\)")
+  (concat "\\(" (regexp-opt markdown-uri-types) ":[^]\t\n\r<>; ]+\\)")
   "Regular expression for matching inline URIs.")
 
 (defconst markdown-regex-angle-uri
diff --git a/tests/markdown-test.el b/tests/markdown-test.el
index 35241cb..669c94a 100644
--- a/tests/markdown-test.el
+++ b/tests/markdown-test.el
@@ -2282,6 +2282,12 @@ See GH-245."
       "[cd\\_z\\_path.m](http://jblevins.org/research/centroid/cd_z_path.m)"
     (markdown-test-range-face-equals 17 65 'markdown-url-face)))
 
+(ert-deftest test-markdown-font-lock/url-face-with-comma-and-parenthesis ()
+  "Test URL highlighting with comma and parenthesis.
+Detail: https://github.com/jrblevin/markdown-mode/issues/649";
+  (markdown-test-string 
"<https://en.wikipedia.org/wiki/File:L%C3%A1szl%C3%B3_Moholy-Nagy,_nuclear_II,_1946_(milwaukee_art_museum).jpg>"
+    (markdown-test-range-face-equals 2 109 'markdown-plain-url-face)))
+
 (ert-deftest test-markdown-font-lock/italics-after-hr ()
   "Test italics after a horizontal rule with asterisks."
   (markdown-test-string "* * *\n\n*italic*\n"



reply via email to

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