[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/markdown-mode 0b8dc23724 2/2: Merge pull request #718 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/markdown-mode 0b8dc23724 2/2: Merge pull request #718 from jrblevin/issue-716-2 |
Date: |
Thu, 7 Jul 2022 20:58:52 -0400 (EDT) |
branch: elpa/markdown-mode
commit 0b8dc23724caa66b18bded28c08f7516cba9d292
Merge: b1db3c4c83 fe52190540
Author: Shohei YOSHIDA <syohex@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #718 from jrblevin/issue-716-2
Don't override link/reference brackets/parentheses faces
---
markdown-mode.el | 12 ++++++------
tests/markdown-test.el | 8 +++++++-
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/markdown-mode.el b/markdown-mode.el
index 4e4bedc0c7..5d9a1f5cb8 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -7847,8 +7847,7 @@ Translate filenames using
`markdown-filename-translate-function'."
(title-end (match-end 7))
(title (match-string-no-properties 7))
;; Markup part
- (mp (list 'face 'markdown-markup-face
- 'invisible 'markdown-markup
+ (mp (list 'invisible 'markdown-markup
'rear-nonsticky t
'font-lock-multiline t))
;; Link part (without face)
@@ -7868,7 +7867,8 @@ Translate filenames using
`markdown-filename-translate-function'."
'font-lock-multiline t)))
(dolist (g '(1 2 4 5 8))
(when (match-end g)
- (add-text-properties (match-beginning g) (match-end g) mp)))
+ (add-text-properties (match-beginning g) (match-end g) mp)
+ (add-face-text-property (match-beginning g) (match-end g)
'markdown-markup-face)))
;; Preserve existing faces applied to link part (e.g., inline code)
(when link-start
(add-text-properties link-start link-end lp)
@@ -7891,8 +7891,7 @@ Translate filenames using
`markdown-filename-translate-function'."
(ref-start (match-beginning 6))
(ref-end (match-end 6))
;; Markup part
- (mp (list 'face 'markdown-markup-face
- 'invisible 'markdown-markup
+ (mp (list 'invisible 'markdown-markup
'rear-nonsticky t
'font-lock-multiline t))
;; Link part
@@ -7912,7 +7911,8 @@ Translate filenames using
`markdown-filename-translate-function'."
'font-lock-multiline t)))
(dolist (g '(1 2 4 5 8))
(when (match-end g)
- (add-text-properties (match-beginning g) (match-end g) mp)))
+ (add-text-properties (match-beginning g) (match-end g) mp)
+ (add-face-text-property (match-beginning g) (match-end g)
'markdown-markup-face)))
(when link-start
(add-text-properties link-start link-end lp)
(add-face-text-property link-start link-end 'markdown-link-face))
diff --git a/tests/markdown-test.el b/tests/markdown-test.el
index 468b066724..9fd67116df 100644
--- a/tests/markdown-test.el
+++ b/tests/markdown-test.el
@@ -3041,7 +3041,13 @@ Detail:
https://github.com/jrblevin/markdown-mode/issues/716"
(search-forward "link-reference")
(markdown-test-range-has-face (match-beginning 0) (1- (match-end 0))
'markdown-reference-face)
- (markdown-test-range-has-face (match-beginning 0) (1- (match-end 0))
'markdown-table-face)))
+ (markdown-test-range-has-face (match-beginning 0) (1- (match-end 0))
'markdown-table-face)
+
+ ;; check [] and ()
+ (goto-char (point-min))
+ (while (re-search-forward "[][()]" nil t)
+ (markdown-test-range-has-face (match-beginning 0) (1- (match-end 0))
'markdown-markup-face)
+ (markdown-test-range-has-face (match-beginning 0) (1- (match-end 0))
'markdown-table-face))))
(ert-deftest test-markdown-font-lock/comment-hanging-indent ()
"Test comments with hanging indentation."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/markdown-mode 0b8dc23724 2/2: Merge pull request #718 from jrblevin/issue-716-2,
ELPA Syncer <=