From 1d5e115216eb93d2b545f0cd9dce6b5e164f1114 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Sat, 19 May 2018 21:22:40 -0700 Subject: [PATCH] only escape fat arrow --- src/reason-parser/reason_syntax_util.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/reason-parser/reason_syntax_util.ml b/src/reason-parser/reason_syntax_util.ml index cea72e1f7..b7e4ac5ae 100644 --- a/src/reason-parser/reason_syntax_util.ml +++ b/src/reason-parser/reason_syntax_util.ml @@ -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 "//" "/\\/" @@