diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2019-03-03 23:12:27 +0000 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2019-03-03 23:12:27 +0000 |
| commit | a7d2098dfd71f948340f63bb4ba84115725529e3 (patch) | |
| tree | cdbbd755b26c9dcbf5d5a57accfc0c2a6ed1f283 /test/helpful-unit-test.el | |
| parent | f3ae5a7c7ba92ef5b9d963105b4ad5384ad3cb41 (diff) | |
Fix docstring rendering when keymap references have their own line
Previously, we'd render "\\<foo-map>\n" as "\n", leading to an
unwanted blank line in the output. See `org-capture` (on MELPA) for an
example.
Diffstat (limited to 'test/helpful-unit-test.el')
| -rw-r--r-- | test/helpful-unit-test.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el index 0e660bb..b2653e4 100644 --- a/test/helpful-unit-test.el +++ b/test/helpful-unit-test.el @@ -75,6 +75,17 @@ (should (string-equal formatted-docstring "M-n")))) +(ert-deftest helpful--docstring-keymap-newline () + "If a keymap reference is on its own line, remove the entire line." + (should + (string-equal + (helpful--format-docstring "Foo. +\\<minibuffer-local-map> +bar") + "Foo. + +bar"))) + (ert-deftest helpful--docstring-advice () "Get the docstring on advised functions." (should |
