Skip to content

Commit

Permalink
only escape fat arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Oct 11, 2018
1 parent fa307a2 commit 1d5e115
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/reason-parser/reason_syntax_util.ml
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ let remove_literal_attrs_mapper =
(** escape_stars_slashes_mapper escapes all stars and slashes in an AST *)
let escape_stars_slashes_mapper =
let escape_stars_slashes str =
if (String.contains str '/') ||
((String.contains str '=') && (String.contains str '>')) then
if (String.contains str '/') || (str = "=>") then
replace_string "/*" "/\\*" @@
replace_string "*/" "*\\/" @@
replace_string "//" "/\\/" @@
Expand Down

0 comments on commit 1d5e115

Please sign in to comment.