Permalink
Browse files

Issue 8211: Format block comments with tabs correctly (#8248)

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 Jun 30, 2018
1 parent 15109e4 commit ced95a0aa74d2978f9f24d34f3eb098a393bf561
Showing with 1 addition and 1 deletion.
  1. +1 −1 hphp/hack/src/hackfmt/hack_format.ml
@@ -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

0 comments on commit ced95a0

Please sign in to comment.