[PATCH] D79139: [clangd] Fix whitespace between chunks in markdown paragraphs.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 30 11:47:18 PDT 2020
sammccall marked 4 inline comments as done.
sammccall added inline comments.
================
Comment at: clang-tools-extra/clangd/FormattedString.cpp:419
C.Contents = std::move(Norm);
C.Kind = Chunk::InlineCode;
return *this;
----------------
kadircet wrote:
> i think we always want a space before code chunks, for example in case of multiple code chunks this would result in malformed makrdown:
>
> ```
> `foo``bar`
> ```
> can you also add a test case for that?
>
>
> if you would like to keep SpaceBefore/After to text only chunks, I suppose we can also check for chunk's kind for outputting a space.
Good catch!
I think it's better to solve this in appendCode as you suggest - inconsistencies between markdown and plaintext are good places for bugs to hide without being seen.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79139/new/
https://reviews.llvm.org/D79139
More information about the cfe-commits
mailing list