Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clangd/FormattedString.cpp | ||
---|---|---|
387 | should we rather use renderInlineBlock here ? because in presence of backticks inside the C.Contents it might become confusing e.g: this is`foo(`x`)` this would become: this is `foo(``x``)` and instead of keeping a marker maybe just: if (Preserve && ..) OS << Sep << "`" << C.Contents << "`"; else OS << Sep << C.Contents; |
clang-tools-extra/clangd/FormattedString.cpp | ||
---|---|---|
387 |
I don't think humans deal with escaping better than with ambiguity - those two examples seem equally confusing to me :-\ I'd suggest better is to pick another marker that's unused in the chunk: this is 'foo(`x`)' Happy to do that in this patch if you like it.
Happy to do that for now if you like, but I don't think it's much clearer. I factored it this way because I think the marker is likely to have more options in future (bold spans, avoiding conflicts) and wanted to hint at that. |
LGTM thanks!
clang-tools-extra/clangd/FormattedString.cpp | ||
---|---|---|
387 |
Yeah that looks like a better approach, feel free to leave a fixme as well. As I believe this should be a rather rare occurrence and we can take care of it once it becomes a real issue or someone has time.
OK makes sense let's keep it that way. |
should we rather use renderInlineBlock here ? because in presence of backticks inside the C.Contents it might become confusing e.g:
this would become:
and instead of keeping a marker maybe just: