Skip to content

Commit 258313e

Browse files
authored
Merge pull request #896 from jrblevin/issue-895
Fix angle URL fontification issue
2 parents 9d2850e + 77cf396 commit 258313e

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

Diff for: CHANGES.md

+3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
* Bug fixes:
1313
- `markdown-export` should not output stderr content to output file
1414
- Hide wikilink markup as part of `markdown-toggle-markup-hiding` [GH-847][]
15+
- Angle URL fontify issue which was introduced by [GH-861][] [GH-895][]
1516

1617
* Improvements:
1718
- Support drag and drop features on Windows and multiple files' drag and drop
1819
- Added cmark and cmark-gfm to the markdown command list.
1920
- Disable `imenu-submenus-on-top` by default [GH-882][]
2021

2122
[gh-847]: https://github.com/jrblevin/markdown-mode/issues/847
23+
[gh-861]: https://github.com/jrblevin/markdown-mode/pull/861
2224
[gh-882]: https://github.com/jrblevin/markdown-mode/issues/882
2325
[gh-891]: https://github.com/jrblevin/markdown-mode/issues/891
26+
[gh-895]: https://github.com/jrblevin/markdown-mode/issues/895
2427

2528
# Markdown Mode 2.7
2629

Diff for: markdown-mode.el

+6-5
Original file line numberDiff line numberDiff line change
@@ -8383,14 +8383,15 @@ Translate filenames using `markdown-filename-translate-function'."
83838383
(url-end (match-end 2)))
83848384
(unless (or (markdown-in-inline-code-p url-start)
83858385
(markdown-in-inline-code-p url-end))
8386-
(let* (;; URI part
8387-
(up (list 'keymap markdown-mode-mouse-map
8388-
'face 'markdown-plain-url-face
8389-
'font-lock-multiline t)))
8386+
(let ((mp (append '(face markdown-markup-face) (cl-copy-list markdown--markup-props)))
8387+
;; URI part
8388+
(up (list 'keymap markdown-mode-mouse-map
8389+
'face 'markdown-plain-url-face
8390+
'font-lock-multiline t)))
83908391
(when markdown-mouse-follow-link
83918392
(setq up (append up '(mouse-face markdown-highlight-face))))
83928393
(dolist (g '(1 3))
8393-
(add-text-properties (match-beginning g) (match-end g) markdown--markup-props))
8394+
(add-text-properties (match-beginning g) (match-end g) mp))
83948395
(add-text-properties url-start url-end up)
83958396
t)))))
83968397

Diff for: tests/markdown-test.el

+7
Original file line numberDiff line numberDiff line change
@@ -2401,6 +2401,13 @@ Detail: https://github.com/jrblevin/markdown-mode/pull/674"
24012401
"[cd\\_z\\_path.m](http://jblevins.org/research/centroid/cd_z_path.m)"
24022402
(markdown-test-range-face-equals 17 65 'markdown-url-face)))
24032403

2404+
(ert-deftest test-markdown-font-lock/angle-url ()
2405+
"Test URL highlighting with comma and parenthesis.
2406+
Detail: https://github.com/jrblevin/markdown-mode/issues/895"
2407+
(markdown-test-string "<https://github.com/jonathanchu/atom-one-dark-theme>"
2408+
(markdown-test-range-has-face 1 1 'markdown-markup-face)
2409+
(markdown-test-range-has-face 52 52 'markdown-markup-face)))
2410+
24042411
(ert-deftest test-markdown-font-lock/url-face-with-comma-and-parenthesis ()
24052412
"Test URL highlighting with comma and parenthesis.
24062413
Detail: https://github.com/jrblevin/markdown-mode/issues/649"

0 commit comments

Comments
 (0)