-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Miscellaneous fixes to the KDoc formatter (#372)
Summary: This CL fixes a number of bugs, covered by associated unit tests: - Line overrun when using closed-open interval notation - More gracefully handle unterminated [] references (for example when comment is using it in things like [closed, open) intervals) - Recognize and convert accidentally capitalized kdoc tags like See - If you have a [ref] which spans a line such that the # ends up as a new line, don't treat this as a "# heading". - Make sure we don't line break at an expression starting with ">" since that would turn into a quoted line. - If you're using optimal line breaking and there's a really long, unbreakable word in the paragraph, switch that paragraph over to greedy line breaking (to make the paragraph better balanced since the really long word throws the algorithm off.) - Fix a few scenarios where markup conversion from <p> and </p> wasn't converting everything. - Allow property[name], not just param[name] - The --hanging-indent flag now also sets the nested list indent (if >= 3) - Some minor code cleanup. Pull Request resolved: #372 Reviewed By: strulovich Differential Revision: D41919138 Pulled By: cgrushko fbshipit-source-id: aae46b67dbcc4dcabe78578c7187b1353cbd8968
- Loading branch information
1 parent
83c4bc7
commit d400033
Showing
7 changed files
with
545 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
kdoc-formatter --greedy --max-line-width=100 --max-comment-width=100 . |
Oops, something went wrong.