summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2019-07-23 13:09:41 +0300
committerFrank LENORMAND <lenormf@gmail.com>2019-07-25 12:28:04 +0300
commitda2f6c296ae3ee280ffaca3937c6ae35c78d1e38 (patch)
tree99a0aebefcddaf2b109c2fc4eb7e29af9b52bd01 /src/input_handler.cc
parente42c81c8eb53a6562f0d7313a6a9a92d8360238f (diff)
src: De-indent docstrings passed to command/option/mapping definitions
This commit implements formatting behaviour when the first character of a docstring is a newline. In that case, the exact indentation level of the next line will be removed from that line and all subsequent non-empty lines. An error will be returned if a subsequent non-empty line does not have the same indentation level. The docstrings are always trimmed (surrounding whitespaces) whether the first character is a newline or not, as was the case prior to this commit. Example: the following declaration ``` define-command test -docstring %{ test: do something Nothing really. More indented lines. } nop ``` would be rendered as ``` test: do something Nothing really. More indented lines. ``` Related to #2405
Diffstat (limited to 'src/input_handler.cc')
0 files changed, 0 insertions, 0 deletions