parseDocumentation retains hard line breaks and removes soft line breaks inside documentation comments.
Wether a line break is hard or soft is determined by the following rules (some of which have been discussed in https://github.com/clangd/clangd/issues/95):
- Hard Markdown line breaks (https://github.github.com/gfm/#hard-line-breaks) are retained
- Line breaks that are preceded by a punctuation are retained
- Line breaks that are followed by "interesting characters" (e.g. Markdown syntax, doxygen commands) are retained
- All other line breaks are removed
Since this is my first contribution feel free to be extra thorough.
Related issue: https://github.com/clangd/clangd/issues/95
We can separate concerns more clearly by not having this function care about markdown.
Can it have a signature like:
and then continue to have line rendering handled elsewhere?