Skip to content

Commit

Permalink
Issue 8211: Format block comments with tabs correctly (#8248)
Browse files Browse the repository at this point in the history
Summary:
This PR fixes issue #8211. We tested it on a few different files, with only tabs, only spaces, and mixed tabs and spaces.

The asterisks aren't aligned in the block comment, but this is also currently true for files indented with only spaces.
Closes #8248

Differential Revision: D8707054

Pulled By: fredemmott

fbshipit-source-id: 559261d919bf2c192bd24eebf8fe1952915a63ae
  • Loading branch information
Alisha Ukani authored and fredemmott committed Jul 12, 2018
1 parent 15109e4 commit ced95a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hphp/hack/src/hackfmt/hack_format.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3060,7 +3060,7 @@ and transform_trivia ~is_leading trivia =
let prefix_space_count str =
let len = String.length str in
let rec aux i =
if i = len || str.[i] <> ' '
if i = len || (str.[i] <> ' ' && str.[i] <> '\t')
then 0
else 1 + (aux (i + 1))
in
Expand Down

0 comments on commit ced95a0

Please sign in to comment.