branch: elpa/markdown-mode commit 244b872d5c4ec116bd08d2fe02d4083bac4a2c17 Author: Chen Zhenge <mr.chenwithcaps...@outlook.com> Commit: Chen Zhenge <mr.chenwithcaps...@outlook.com>
Add a test for delimiters with surrounding spaces --- tests/markdown-test.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/markdown-test.el b/tests/markdown-test.el index 2822c85..b9afe29 100644 --- a/tests/markdown-test.el +++ b/tests/markdown-test.el @@ -6903,6 +6903,21 @@ title: asdasdasd | A very very very long cell | | ")))) +(ert-deftest test-markdown-table/align-with-spaces-before-delimiter () + "Test table realignment when there are spaces before a delimiter" + (markdown-test-string " +| A | B | C | D | +| - | :- | :-: | -: | +| aaa | bbbb | ccccc | dddddd | +" + (search-forward "A") + (markdown-table-align) + (should (string= (buffer-string) " +| A | B | C | D | +|-----|:-----|:-----:|-------:| +| aaa | bbbb | ccccc | dddddd | +")))) + (provide 'markdown-test) ;;; markdown-test.el ends here