[PATCH] D71422: [clangd] Introduce bulletlists
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 16 07:20:41 PST 2019
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/FormattedString.h:95
+ /// Causes every line of the document to be indented by 2 spaces. Except the
+ /// first line, it is containers responsibility to adjust padding for first
----------------
sammccall wrote:
> Why is it the responsibility of this class to keep track of its indentation within the parent?
> This seems like it should be a parameter to the render functions, rather than state.
>
> BTW, it appears to be legal to write lists as:
> ```
> -
> this is the
> first item
> -
> second item
> ```
> Which is much easier/more regular to generate, because it doesn't require `Document` to special-case the first line.
moved indentation logic into bullet list.
but that wouldn't look nice when rendering plain text? also I wouldn't call that special casing, as it just generates trimmed output, like rest of the APIs
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71422/new/
https://reviews.llvm.org/D71422
More information about the cfe-commits
mailing list