branch: elpa/markdown-mode commit c71548a58f9b611a6670ba8e9036d3d8e8435bf8 Merge: b76404d7ef c021b8f0ba Author: Shohei YOSHIDA <syo...@gmail.com> Commit: GitHub <nore...@github.com>
Merge pull request #796 from jrblevin/issue/794 Set pre attribute the end of the last line for indented block --- CHANGES.md | 2 ++ markdown-mode.el | 1 + tests/markdown-test.el | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 6e09580bec..2fdaecf798 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -28,6 +28,7 @@ - Improve `markdown-insert-table` prompt message [GH-771][] - Consider `major-mode-remap-alist` to determine major-mode for code blocks [GH-787][] - Set marker after footnote reference [GH-793][] + - Improve putting text attribute for indented blocks [GH-794][] * Bug fixes: - Don't override table faces by link faces [GH-716][] @@ -61,6 +62,7 @@ [gh-786]: https://github.com/jrblevin/markdown-mode/pull/786 [gh-787]: https://github.com/jrblevin/markdown-mode/issues/787 [gh-793]: https://github.com/jrblevin/markdown-mode/pull/793 + [gh-794]: https://github.com/jrblevin/markdown-mode/issues/794 # Markdown Mode 2.5 diff --git a/markdown-mode.el b/markdown-mode.el index 4bb1a57dcb..0bb4b7ccf3 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -1317,6 +1317,7 @@ giving the bounds of the current and parent list items." (not (eobp))) (forward-line)) (skip-syntax-backward "-") + (forward-line) (setq close (point))) ;; If current line has a list marker, update levels, move to end of block ((looking-at markdown-regex-list) diff --git a/tests/markdown-test.el b/tests/markdown-test.el index 623cd40f9c..10b89ae2ed 100644 --- a/tests/markdown-test.el +++ b/tests/markdown-test.el @@ -3826,8 +3826,8 @@ returns nil." (should (equal (markdown-syntax-propertize-extend-region 93 157) nil)) (should (equal (markdown-syntax-propertize-extend-region 496 502) - (cons 486 510))) - (should (equal (markdown-syntax-propertize-extend-region 486 510) + (cons 486 511))) + (should (equal (markdown-syntax-propertize-extend-region 486 511) nil)) ;; Region that begins and ends with \n\n should not be extended (should (equal (markdown-syntax-propertize-extend-region 157 355)