swiftlang / swift-format

Formatting technology for Swift source code
Apache License 2.0
2.38k stars 216 forks source link

Initial rough implementation of comment line wrapping. #730

Closed shawnhyam closed 2 months ago

shawnhyam commented 2 months ago

Rough initial implementation of line wrapping comments (.line and .docLine). Encountered an issue that line comments were not being merged even though there was code to do it, because that code was being thwarted by soft breaks. Wrote two versions, one that calls into the Markdown library and one that just does simple line wrapping if comments are too long -- it will not combine short lines together the way Markdown would.

To do: