-
Notifications
You must be signed in to change notification settings - Fork 74
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
Space inserted after link in KDoc, even when not indended. #190
Comments
Related, and more problematic issue: /** BEFORE Please see [onNext] (which has more details) */
/** AFTER Please see [onNext](which has more details) */ |
We didn't realize these are all valid KDocs. I'll try to tackle this tomorrow. The hard part is to decide what behavior we should have. I'm leaning towards collapsing multiple spaces into a single space and not add any spaces anywhere. |
Looks like the issue is that the kdoc lexer we use (bundled with the compiler) is lacking and would report confusing data to ktfmt. I want to look into using Dokka instead. |
Here's another example that breaks the KDoc.
becomes
This not only breaks the KDoc reference, but also incorrect removes the space after it. |
In KDoc, if you want to refer to the plural of an object that has a singular name, you might write:
/** There are many [FooObject]s. */
ktfmt inserts a space after the link, which is unexpected:
/** There are many [FooObject] s. */
The text was updated successfully, but these errors were encountered: