Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Unify comment formatting inside the empty blocks #647

Merged
merged 21 commits into from
Sep 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use find_opt instead
  • Loading branch information
ah-yu committed Sep 26, 2022
commit b318a7c494cd6d02e2940c88891e21343026970e
5 changes: 2 additions & 3 deletions src/res_printer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,9 @@ let hasNestedJsxOrMoreThanOneChild expr =
loop false expr

let hasCommentsInside tbl loc =
match Hashtbl.find tbl.CommentTable.inside loc with
| [] -> false
match Hashtbl.find_opt tbl.CommentTable.inside loc with
| None -> false
| _ -> true
| exception Not_found -> false

let printMultilineCommentContent txt =
(* Turns
Expand Down