[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/markdown-mode 0a7404a1c7 2/2: Merge pull request #776 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/markdown-mode 0a7404a1c7 2/2: Merge pull request #776 from jrblevin/issue-774 |
Date: |
Sun, 16 Jul 2023 10:02:16 -0400 (EDT) |
branch: elpa/markdown-mode
commit 0a7404a1c7b1916ca6e8408a6c8bad9125c846d2
Merge: 8dc04cc676 032fa56a89
Author: Shohei YOSHIDA <syohex@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #776 from jrblevin/issue-774
Don't allow space between label and text in reference link
---
CHANGES.md | 4 +++-
markdown-mode.el | 2 +-
tests/markdown-test.el | 5 +++++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 5cd72d3b60..99cddab083 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -3,7 +3,8 @@
*Under development*
* **Breaking changes:**
- - GNU Emacs 26.1 or later is required.
+ - GNU Emacs 26.1 or later is required.
+ - Don't allow space between label and text in reference link same as
CommonMark [GH-774][]
* New Features:
- Introduce `markdown-fontify-whole-heading-line` variable for highlighting
@@ -50,6 +51,7 @@
[gh-766]: https://github.com/jrblevin/markdown-mode/issues/766
[gh-768]: https://github.com/jrblevin/markdown-mode/pull/768
[gh-771]: https://github.com/jrblevin/markdown-mode/issues/771
+ [gh-774]: https://github.com/jrblevin/markdown-mode/issues/774
# Markdown Mode 2.5
diff --git a/markdown-mode.el b/markdown-mode.el
index 6422bef264..521e191aba 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -704,7 +704,7 @@ Group 7 matches the title (optional).
Group 8 matches the closing parenthesis.")
(defconst markdown-regex-link-reference
- "\\(?1:!\\)?\\(?2:\\[\\)\\(?3:[^]^][^]]*\\|\\)\\(?4:\\]\\)[
]?\\(?5:\\[\\)\\(?6:[^]]*?\\)\\(?7:\\]\\)"
+
"\\(?1:!\\)?\\(?2:\\[\\)\\(?3:[^]^][^]]*\\|\\)\\(?4:\\]\\)\\(?5:\\[\\)\\(?6:[^]]*?\\)\\(?7:\\]\\)"
"Regular expression for a reference link [text][id].
Group 1 matches the leading exclamation point (optional).
Group 2 matches the opening square bracket for the link text.
diff --git a/tests/markdown-test.el b/tests/markdown-test.el
index 8ea01c9107..b5c26a7eb2 100644
--- a/tests/markdown-test.el
+++ b/tests/markdown-test.el
@@ -5407,6 +5407,11 @@ http://example.com \"title\" )
(goto-char 13)
(should (markdown-link-p))))
+(ert-deftest test-markdown-link/link-p-2 ()
+ "Don't allow space between label and text in reference link."
+ (markdown-test-string "[one] [two]"
+ (should-not (markdown-link-p))))
+
;;; Wiki link tests:
(ert-deftest test-markdown-wiki-link/file-local-variables ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/markdown-mode 0a7404a1c7 2/2: Merge pull request #776 from jrblevin/issue-774,
ELPA Syncer <=