[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/markdown-mode 761bfb8 2/2: Merge pull request #645 from jr
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/markdown-mode 761bfb8 2/2: Merge pull request #645 from jrblevin/issue-638 |
Date: |
Sat, 14 Aug 2021 10:57:33 -0400 (EDT) |
branch: elpa/markdown-mode
commit 761bfb8fbacea3472b94d354239119e35af25ce5
Merge: 562cd35 55fa8c0
Author: Shohei YOSHIDA <syohex@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #645 from jrblevin/issue-638
Fix fill paragraph with setext heading issue
---
CHANGES.md | 2 ++
markdown-mode.el | 1 +
tests/markdown-test.el | 10 ++++++++++
3 files changed, 13 insertions(+)
diff --git a/CHANGES.md b/CHANGES.md
index e2aacf1..170f4e4 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -73,6 +73,7 @@
- Fix issue that executing `markdown-table-sort-lines` via menu-bar with
older Emacs(< 28) [GH-641][]
- 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][]
[gh-290]: https://github.com/jrblevin/markdown-mode/issues/290
[gh-311]: https://github.com/jrblevin/markdown-mode/issues/311
@@ -104,6 +105,7 @@
[gh-631]: https://github.com/jrblevin/markdown-mode/issues/631
[gh-634]: https://github.com/jrblevin/markdown-mode/issues/634
[gh-635]: https://github.com/jrblevin/markdown-mode/issues/635
+ [gh-638]: https://github.com/jrblevin/markdown-mode/issues/638
[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
diff --git a/markdown-mode.el b/markdown-mode.el
index 2efbfd1..93b5ed2 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -9730,6 +9730,7 @@ rows and columns and the column alignment."
;; not paragraph-ending suffixes:
".* $" ; line ending in two spaces
"^#+"
+ "^[-=]+"
"[ \t]*\\[\\^\\S-*\\]:[ \t]*$") ; just the start of
a footnote def
"\\|"))
(setq-local adaptive-fill-first-line-regexp "\\`[ \t]*[A-Z]?>[ \t]*?\\'")
diff --git a/tests/markdown-test.el b/tests/markdown-test.el
index ff1ed54..e8506d6 100644
--- a/tests/markdown-test.el
+++ b/tests/markdown-test.el
@@ -5566,6 +5566,16 @@ This includes preserving whitespace after the pipe."
(fill-region (point-min) (point-max))
(should (string-equal (buffer-string) text)))))
+(ert-deftest test-markdown-filling/setext-heading ()
+ "Fill paragraph at setext heading.
+Details: https://github.com/jrblevin/markdown-mode/issues/638"
+ (let ((input "Heading
+=======
+"))
+ (markdown-test-string input
+ (markdown-fill-paragraph)
+ (should (string= (buffer-string) input)))))
+
;;; Export tests:
(ert-deftest test-markdown-hook/xhtml-standalone ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/markdown-mode 761bfb8 2/2: Merge pull request #645 from jrblevin/issue-638,
ELPA Syncer <=