-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Column limits don't seem to apply to comments #469
Comments
Did you mean to file this over at apple/swift-format? The current behavior is WAI, but I'd like to make improvements here. Treating comments as Markdown resolves the majority of my concerns around formatting comments (a long URL? Markdown will still preserve it past the line limit. Some fancy ASCII art diagram? Wrap it in triple-backticks to preserve it), but we'll need semver releases over at https://github.com/apple/swift-markdown before we can adopt it. |
Uh, yeah. Can it be moved? Should I refile?
? |
I've transferred it over.
Working as intended (under the constraints today, which is that I don't want us to implement our own line-breaking logic for prose, and using swift-markdown would fix that). |
Tracked in Apple’s issue tracker as rdar://126948257 |
I tried using swift-markdown to format doc comments, and while the results were mostly good, there was one issue in particular that really broke the formatting. A line like this:
would get reformatted as:
Whenever the line would wrap on a piece of text that was enclosed in a backtick, it would treat it as a new paragraph. There were some other issues with double line breaks for new paragraphs, and using blank spaces instead of backslash for line continuations (which are in danger of being removed by the editor), but this was the biggest problem. |
That looks like it would be a bug in swift-markdown, because an inline node shouldn't cause a paragraph break like that. If you can repro it standalone, can you file an issue over there and see what they say? |
Issue created: swiftlang/swift-markdown#197 |
Description
I want column limits respected even in comments, and I want them to be automatically line-wrapped, preserving markdown semantics within doc comments.
Steps to Reproduce
Run
swift-format lint
on:It should complain, but does not.
The text was updated successfully, but these errors were encountered: