diff --git a/ios/RCTMarkdownUtils.mm b/ios/RCTMarkdownUtils.mm index 1708c98d..d46019a7 100644 --- a/ios/RCTMarkdownUtils.mm +++ b/ios/RCTMarkdownUtils.mm @@ -1,9 +1,8 @@ #import #import #import -#import -#include #include +#include using namespace facebook; @@ -50,7 +49,7 @@ - (NSAttributedString *)parseMarkdown:(nullable NSAttributedString *)input auto func = rt.global().getPropertyAsFunction(rt, "parseExpensiMarkToRanges"); auto output = func.call(rt, [inputString UTF8String]); auto json = rt.global().getPropertyAsObject(rt, "JSON").getPropertyAsFunction(rt, "stringify").call(rt, output).asString(rt).utf8(rt); - + NSData *data = [NSData dataWithBytes:json.data() length:json.length()]; NSError *error = nil; NSArray *ranges = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];