diff --git a/android/src/main/java/com/expensify/livemarkdown/QuoteSpan.java b/android/src/main/java/com/expensify/livemarkdown/BlockquoteSpan.java similarity index 89% rename from android/src/main/java/com/expensify/livemarkdown/QuoteSpan.java rename to android/src/main/java/com/expensify/livemarkdown/BlockquoteSpan.java index 3f446b5d..de969ca8 100644 --- a/android/src/main/java/com/expensify/livemarkdown/QuoteSpan.java +++ b/android/src/main/java/com/expensify/livemarkdown/BlockquoteSpan.java @@ -7,13 +7,13 @@ import com.facebook.react.uimanager.PixelUtil; -public class QuoteSpan implements LeadingMarginSpan { +public class BlockquoteSpan implements LeadingMarginSpan { private final int borderColor; private final float borderWidth; private final float marginLeft; private final float paddingLeft; - public QuoteSpan(int borderColor, float borderWidth, float marginLeft, float paddingLeft) { + public BlockquoteSpan(int borderColor, float borderWidth, float marginLeft, float paddingLeft) { this.borderColor = borderColor; this.borderWidth = PixelUtil.toPixelFromDIP(borderWidth); this.marginLeft = PixelUtil.toPixelFromDIP(marginLeft); diff --git a/android/src/main/java/com/expensify/livemarkdown/MarkdownStyle.java b/android/src/main/java/com/expensify/livemarkdown/MarkdownStyle.java index 7db53863..00d9c11f 100644 --- a/android/src/main/java/com/expensify/livemarkdown/MarkdownStyle.java +++ b/android/src/main/java/com/expensify/livemarkdown/MarkdownStyle.java @@ -15,10 +15,10 @@ public class MarkdownStyle { private final int mSyntaxColor; private final int mLinkColor; private final float mH1FontSize; - private final int mQuoteBorderColor; - private final float mQuoteBorderWidth; - private final float mQuoteMarginLeft; - private final float mQuotePaddingLeft; + private final int mBlockquoteBorderColor; + private final float mBlockquoteBorderWidth; + private final float mBlockquoteMarginLeft; + private final float mBlockquotePaddingLeft; private final String mCodeFontFamily; private final int mCodeColor; private final int mCodeBackgroundColor; @@ -32,10 +32,10 @@ public MarkdownStyle(@NonNull ReadableMap map, @NonNull Context context) { mSyntaxColor = parseColor(map, "syntax", "color", context); mLinkColor = parseColor(map, "link", "color", context); mH1FontSize = parseFloat(map, "h1", "fontSize"); - mQuoteBorderColor = parseColor(map, "quote", "borderColor", context); - mQuoteBorderWidth = parseFloat(map, "quote", "borderWidth"); - mQuoteMarginLeft = parseFloat(map, "quote", "marginLeft"); - mQuotePaddingLeft = parseFloat(map, "quote", "paddingLeft"); + mBlockquoteBorderColor = parseColor(map, "blockquote", "borderColor", context); + mBlockquoteBorderWidth = parseFloat(map, "blockquote", "borderWidth"); + mBlockquoteMarginLeft = parseFloat(map, "blockquote", "marginLeft"); + mBlockquotePaddingLeft = parseFloat(map, "blockquote", "paddingLeft"); mCodeFontFamily = parseString(map, "code", "fontFamily"); mCodeColor = parseColor(map, "code", "color", context); mCodeBackgroundColor = parseColor(map, "code", "backgroundColor", context); @@ -85,20 +85,20 @@ public float getH1FontSize() { return mH1FontSize; } - public int getQuoteBorderColor() { - return mQuoteBorderColor; + public int getBlockquoteBorderColor() { + return mBlockquoteBorderColor; } - public float getQuoteBorderWidth() { - return mQuoteBorderWidth; + public float getBlockquoteBorderWidth() { + return mBlockquoteBorderWidth; } - public float getQuoteMarginLeft() { - return mQuoteMarginLeft; + public float getBlockquoteMarginLeft() { + return mBlockquoteMarginLeft; } - public float getQuotePaddingLeft() { - return mQuotePaddingLeft; + public float getBlockquotePaddingLeft() { + return mBlockquotePaddingLeft; } public String getCodeFontFamily() { diff --git a/android/src/main/java/com/expensify/livemarkdown/MarkdownUtils.java b/android/src/main/java/com/expensify/livemarkdown/MarkdownUtils.java index 5bf0cbd2..241dfccd 100644 --- a/android/src/main/java/com/expensify/livemarkdown/MarkdownUtils.java +++ b/android/src/main/java/com/expensify/livemarkdown/MarkdownUtils.java @@ -144,7 +144,7 @@ private Object makeH1FontSizeSpan() { return new AbsoluteSizeSpan((int) mMarkdownStyle.getH1FontSize(), true); } - private static Object makeHeadingLineHeightSpan(float lineHeight) { + private static Object makeH1LineHeightSpan(float lineHeight) { return (LineHeightSpan) (text, start, end, spanstartv, lh, fm) -> { fm.top -= lineHeight / 4; fm.ascent -= lineHeight / 4; @@ -152,11 +152,11 @@ private static Object makeHeadingLineHeightSpan(float lineHeight) { } private Object makeBlockquoteMarginSpan() { - return new QuoteSpan( - mMarkdownStyle.getQuoteBorderColor(), - mMarkdownStyle.getQuoteBorderWidth(), - mMarkdownStyle.getQuoteMarginLeft(), - mMarkdownStyle.getQuotePaddingLeft()); + return new BlockquoteSpan( + mMarkdownStyle.getBlockquoteBorderColor(), + mMarkdownStyle.getBlockquoteBorderWidth(), + mMarkdownStyle.getBlockquoteMarginLeft(), + mMarkdownStyle.getBlockquotePaddingLeft()); } public void applyMarkdownFormatting(SpannableStringBuilder ssb) { @@ -199,7 +199,7 @@ private void applyRange(SpannableStringBuilder ssb, String type, int start, int case "strikethrough": setSpan(ssb, makeStrikethroughSpan(), start, end); break; - case "mention": + case "mention-here": setSpan(ssb, makeBoldSpan(), start, end); setSpan(ssb, makeMentionHereBackgroundSpan(), start, end); break; @@ -231,7 +231,7 @@ private void applyRange(SpannableStringBuilder ssb, String type, int start, int CustomLineHeightSpan[] spans = ssb.getSpans(0, ssb.length(), CustomLineHeightSpan.class); if (spans.length >= 1) { int lineHeight = spans[0].getLineHeight(); - setSpan(ssb, makeHeadingLineHeightSpan(lineHeight * 1.5f), start, end); + setSpan(ssb, makeH1LineHeightSpan(lineHeight * 1.5f), start, end); } // NOTE: size span must be set after line height span to avoid height jumps setSpan(ssb, makeH1FontSizeSpan(), start, end); diff --git a/ios/MarkdownLayoutManager.h b/ios/MarkdownLayoutManager.h index 1e747aed..fa0e9e33 100644 --- a/ios/MarkdownLayoutManager.h +++ b/ios/MarkdownLayoutManager.h @@ -1,8 +1,12 @@ #import #import +NS_ASSUME_NONNULL_BEGIN + @interface MarkdownLayoutManager : NSLayoutManager @property(nonatomic) RCTMarkdownUtils *markdownUtils; @end + +NS_ASSUME_NONNULL_END diff --git a/ios/MarkdownLayoutManager.mm b/ios/MarkdownLayoutManager.mm index ee9422a1..17362823 100644 --- a/ios/MarkdownLayoutManager.mm +++ b/ios/MarkdownLayoutManager.mm @@ -6,27 +6,27 @@ - (void)drawBackgroundForGlyphRange:(NSRange)glyphsToShow atPoint:(CGPoint)origi [super drawBackgroundForGlyphRange:glyphsToShow atPoint:origin]; [self enumerateLineFragmentsForGlyphRange:glyphsToShow usingBlock:^(CGRect rect, CGRect usedRect, NSTextContainer * _Nonnull textContainer, NSRange glyphRange, BOOL * _Nonnull stop) { - __block BOOL isQuote = NO; + __block BOOL isBlockquote = NO; RCTMarkdownUtils *markdownUtils = [self valueForKey:@"markdownUtils"]; - [markdownUtils.quoteRanges enumerateObjectsUsingBlock:^(NSValue *item, NSUInteger idx, BOOL * _Nonnull stop) { + [markdownUtils.blockquoteRanges enumerateObjectsUsingBlock:^(NSValue *item, NSUInteger idx, BOOL * _Nonnull stop) { NSRange range = [item rangeValue]; NSUInteger start = range.location; NSUInteger end = start + range.length; NSUInteger location = glyphRange.location; if (location >= start && location < end) { - isQuote = YES; + isBlockquote = YES; *stop = YES; } }]; - if (isQuote) { + if (isBlockquote) { CGFloat paddingLeft = markdownUtils.backedTextInputView.textContainerInset.left; CGFloat paddingTop = markdownUtils.backedTextInputView.textContainerInset.top; - CGFloat x = paddingLeft + markdownUtils.markdownStyle.quoteMarginLeft; + CGFloat x = paddingLeft + markdownUtils.markdownStyle.blockquoteMarginLeft; CGFloat y = paddingTop + rect.origin.y; - CGFloat width = markdownUtils.markdownStyle.quoteBorderWidth; + CGFloat width = markdownUtils.markdownStyle.blockquoteBorderWidth; CGFloat height = rect.size.height; CGRect lineRect = CGRectMake(x, y, width, height); - [markdownUtils.markdownStyle.quoteBorderColor setFill]; + [markdownUtils.markdownStyle.blockquoteBorderColor setFill]; UIRectFill(lineRect); } }]; diff --git a/ios/MarkdownTextInputDecoratorView.h b/ios/MarkdownTextInputDecoratorView.h index afa32ac4..7de9a1f4 100644 --- a/ios/MarkdownTextInputDecoratorView.h +++ b/ios/MarkdownTextInputDecoratorView.h @@ -1,8 +1,12 @@ #import #import +NS_ASSUME_NONNULL_BEGIN + @interface MarkdownTextInputDecoratorView : UIView -- (void)setMarkdownStyle:(nonnull RCTMarkdownStyle *)markdownStyle; +- (void)setMarkdownStyle:(RCTMarkdownStyle *)markdownStyle; @end + +NS_ASSUME_NONNULL_END diff --git a/ios/MarkdownTextInputDecoratorView.mm b/ios/MarkdownTextInputDecoratorView.mm index 44d07baa..1f8f7133 100644 --- a/ios/MarkdownTextInputDecoratorView.mm +++ b/ios/MarkdownTextInputDecoratorView.mm @@ -94,7 +94,7 @@ - (void)willMoveToWindow:(UIWindow *)newWindow } } -- (void)setMarkdownStyle:(nonnull RCTMarkdownStyle *)markdownStyle +- (void)setMarkdownStyle:(RCTMarkdownStyle *)markdownStyle { _markdownStyle = markdownStyle; [_markdownUtils setMarkdownStyle:markdownStyle]; diff --git a/ios/MarkdownTextInputDecoratorViewManager.h b/ios/MarkdownTextInputDecoratorViewManager.h index f3aafec6..355868b9 100644 --- a/ios/MarkdownTextInputDecoratorViewManager.h +++ b/ios/MarkdownTextInputDecoratorViewManager.h @@ -1,5 +1,8 @@ #import -@interface MarkdownTextInputDecoratorViewManager : RCTViewManager +NS_ASSUME_NONNULL_BEGIN +@interface MarkdownTextInputDecoratorViewManager : RCTViewManager @end + +NS_ASSUME_NONNULL_END diff --git a/ios/RCTMarkdownStyle.h b/ios/RCTMarkdownStyle.h index dfd27686..b19ad7bf 100644 --- a/ios/RCTMarkdownStyle.h +++ b/ios/RCTMarkdownStyle.h @@ -2,23 +2,25 @@ #import #endif /* RCT_NEW_ARCH_ENABLED */ +NS_ASSUME_NONNULL_BEGIN + @interface RCTMarkdownStyle : NSObject -@property (nonatomic, nonnull) UIColor *syntaxColor; -@property (nonatomic, nonnull) UIColor *linkColor; +@property (nonatomic) UIColor *syntaxColor; +@property (nonatomic) UIColor *linkColor; @property (nonatomic) CGFloat h1FontSize; -@property (nonatomic, nonnull) UIColor *quoteBorderColor; -@property (nonatomic) CGFloat quoteBorderWidth; -@property (nonatomic) CGFloat quoteMarginLeft; -@property (nonatomic) CGFloat quotePaddingLeft; -@property (nonatomic, nonnull) NSString *codeFontFamily; -@property (nonatomic, nonnull) UIColor *codeColor; -@property (nonatomic, nonnull) UIColor *codeBackgroundColor; -@property (nonatomic, nonnull) NSString *preFontFamily; -@property (nonatomic, nonnull) UIColor *preColor; -@property (nonatomic, nonnull) UIColor *preBackgroundColor; -@property (nonatomic, nonnull) UIColor *mentionHereBackgroundColor; -@property (nonatomic, nonnull) UIColor *mentionUserBackgroundColor; +@property (nonatomic) UIColor *blockquoteBorderColor; +@property (nonatomic) CGFloat blockquoteBorderWidth; +@property (nonatomic) CGFloat blockquoteMarginLeft; +@property (nonatomic) CGFloat blockquotePaddingLeft; +@property (nonatomic) NSString *codeFontFamily; +@property (nonatomic) UIColor *codeColor; +@property (nonatomic) UIColor *codeBackgroundColor; +@property (nonatomic) NSString *preFontFamily; +@property (nonatomic) UIColor *preColor; +@property (nonatomic) UIColor *preBackgroundColor; +@property (nonatomic) UIColor *mentionHereBackgroundColor; +@property (nonatomic) UIColor *mentionUserBackgroundColor; #ifdef RCT_NEW_ARCH_ENABLED - (instancetype)initWithStruct:(const facebook::react::MarkdownTextInputDecoratorViewMarkdownStyleStruct &)style; @@ -27,3 +29,5 @@ #endif /* RCT_NEW_ARCH_ENABLED */ @end + +NS_ASSUME_NONNULL_END diff --git a/ios/RCTMarkdownStyle.mm b/ios/RCTMarkdownStyle.mm index 1cbe7f0f..a5f7026c 100644 --- a/ios/RCTMarkdownStyle.mm +++ b/ios/RCTMarkdownStyle.mm @@ -19,10 +19,10 @@ - (instancetype)initWithStruct:(const facebook::react::MarkdownTextInputDecorato _h1FontSize = style.h1.fontSize; - _quoteBorderColor = RCTUIColorFromSharedColor(style.quote.borderColor); - _quoteBorderWidth = style.quote.borderWidth; - _quoteMarginLeft = style.quote.marginLeft; - _quotePaddingLeft = style.quote.paddingLeft; + _blockquoteBorderColor = RCTUIColorFromSharedColor(style.blockquote.borderColor); + _blockquoteBorderWidth = style.blockquote.borderWidth; + _blockquoteMarginLeft = style.blockquote.marginLeft; + _blockquotePaddingLeft = style.blockquote.paddingLeft; _codeFontFamily = RCTNSStringFromString(style.code.fontFamily); _codeColor = RCTUIColorFromSharedColor(style.code.color); @@ -42,19 +42,19 @@ - (instancetype)initWithStruct:(const facebook::react::MarkdownTextInputDecorato #else -- (instancetype)initWithDictionary:(nonnull NSDictionary *)json +- (instancetype)initWithDictionary:(NSDictionary *)json { if (self = [super init]) { _syntaxColor = [RCTConvert UIColor:json[@"syntax"][@"color"]]; _linkColor = [RCTConvert UIColor:json[@"link"][@"color"]]; - _h1FontSize = [json[@"h1"][@"fontSize"] floatValue]; + _h1FontSize = [RCTConvert CGFloat:json[@"h1"][@"fontSize"]]; - _quoteBorderColor = [RCTConvert UIColor:json[@"quote"][@"borderColor"]]; - _quoteBorderWidth = [json[@"quote"][@"borderWidth"] floatValue]; - _quoteMarginLeft = [json[@"quote"][@"marginLeft"] floatValue]; - _quotePaddingLeft = [json[@"quote"][@"paddingLeft"] floatValue]; + _quoteBorderColor = [RCTConvert UIColor:json[@"blockquote"][@"borderColor"]]; + _quoteBorderWidth = [RCTConvert CGFloat:json[@"blockquote"][@"borderWidth"]]; + _quoteMarginLeft = [RCTConvert CGFloat:json[@"blockquote"][@"marginLeft"]]; + _quotePaddingLeft = [RCTConvert CGFloat:json[@"blockquote"][@"paddingLeft"]]; _codeFontFamily = [RCTConvert NSString:json[@"code"][@"fontFamily"]]; _codeColor = [RCTConvert UIColor:json[@"code"][@"color"]]; diff --git a/ios/RCTMarkdownUtils.h b/ios/RCTMarkdownUtils.h index fbb9b80d..31257cbc 100644 --- a/ios/RCTMarkdownUtils.h +++ b/ios/RCTMarkdownUtils.h @@ -1,14 +1,18 @@ #import #import +NS_ASSUME_NONNULL_BEGIN + @interface RCTMarkdownUtils : NSObject @property (nonatomic) RCTMarkdownStyle *markdownStyle; -@property (nonatomic) NSMutableArray *quoteRanges; +@property (nonatomic) NSMutableArray *blockquoteRanges; @property (weak, nonatomic) UIView *backedTextInputView; - (instancetype)initWithBackedTextInputView:(UIView *)backedTextInputView; -- (NSAttributedString *)parseMarkdown:(NSAttributedString *)input; +- (NSAttributedString *)parseMarkdown:(nullable NSAttributedString *)input; @end + +NS_ASSUME_NONNULL_END diff --git a/ios/RCTMarkdownUtils.mm b/ios/RCTMarkdownUtils.mm index 9bcd0815..3ab4fde5 100644 --- a/ios/RCTMarkdownUtils.mm +++ b/ios/RCTMarkdownUtils.mm @@ -55,7 +55,7 @@ - (NSAttributedString *)parseMarkdown:(nullable NSAttributedString *)input // This is a workaround that applies the NSUnderlineStyleNone to the string before iterating over ranges which resolves this problem. [attributedString addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleNone] range:NSMakeRange(0, attributedString.length)]; - _quoteRanges = [NSMutableArray new]; + _blockquoteRanges = [NSMutableArray new]; [ranges enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { NSArray *item = obj; @@ -64,9 +64,9 @@ - (NSAttributedString *)parseMarkdown:(nullable NSAttributedString *)input NSUInteger length = [item[2] unsignedIntegerValue]; NSRange range = NSMakeRange(location, length); - if ([type isEqualToString:@"bold"] || [type isEqualToString:@"mention"] || [type isEqualToString:@"mention-user"] || [type isEqualToString:@"syntax"] || [type isEqualToString:@"italic"] || [type isEqualToString:@"code"] || [type isEqualToString:@"pre"] || [type isEqualToString:@"h1"]) { + if ([type isEqualToString:@"bold"] || [type isEqualToString:@"mention-here"] || [type isEqualToString:@"mention-user"] || [type isEqualToString:@"syntax"] || [type isEqualToString:@"italic"] || [type isEqualToString:@"code"] || [type isEqualToString:@"pre"] || [type isEqualToString:@"h1"]) { UIFont *font = [attributedString attribute:NSFontAttributeName atIndex:location effectiveRange:NULL]; - if ([type isEqualToString:@"bold"] || [type isEqualToString:@"mention"] || [type isEqualToString:@"mention-user"] || [type isEqualToString:@"syntax"]) { + if ([type isEqualToString:@"bold"] || [type isEqualToString:@"mention-here"] || [type isEqualToString:@"mention-user"] || [type isEqualToString:@"syntax"]) { font = [RCTFont updateFont:font withWeight:@"bold"]; } else if ([type isEqualToString:@"italic"]) { font = [RCTFont updateFont:font withStyle:@"italic"]; @@ -92,7 +92,7 @@ - (NSAttributedString *)parseMarkdown:(nullable NSAttributedString *)input } else if ([type isEqualToString:@"code"]) { [attributedString addAttribute:NSForegroundColorAttributeName value:_markdownStyle.codeColor range:range]; [attributedString addAttribute:NSBackgroundColorAttributeName value:_markdownStyle.codeBackgroundColor range:range]; - } else if ([type isEqualToString:@"mention"]) { + } else if ([type isEqualToString:@"mention-here"]) { [attributedString addAttribute:NSBackgroundColorAttributeName value:_markdownStyle.mentionHereBackgroundColor range:range]; } else if ([type isEqualToString:@"mention-user"]) { // TODO: change mention color when it mentions current user @@ -101,12 +101,12 @@ - (NSAttributedString *)parseMarkdown:(nullable NSAttributedString *)input [attributedString addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:range]; [attributedString addAttribute:NSForegroundColorAttributeName value:_markdownStyle.linkColor range:range]; } else if ([type isEqualToString:@"blockquote"]) { - CGFloat indent = _markdownStyle.quoteMarginLeft + _markdownStyle.quoteBorderWidth + _markdownStyle.quotePaddingLeft; + CGFloat indent = _markdownStyle.blockquoteMarginLeft + _markdownStyle.blockquoteBorderWidth + _markdownStyle.blockquotePaddingLeft; NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new]; paragraphStyle.firstLineHeadIndent = indent; paragraphStyle.headIndent = indent; [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:range]; - [_quoteRanges addObject:[NSValue valueWithRange:range]]; + [_blockquoteRanges addObject:[NSValue valueWithRange:range]]; } else if ([type isEqualToString:@"pre"]) { [attributedString addAttribute:NSForegroundColorAttributeName value:_markdownStyle.preColor range:range]; NSRange rangeForBackground = [inputString characterAtIndex:range.location] == '\n' ? NSMakeRange(range.location + 1, range.length - 1) : range; diff --git a/parser/__tests__/index.test.js b/parser/__tests__/index.test.js index 93bbdb9c..e9eece68 100644 --- a/parser/__tests__/index.test.js +++ b/parser/__tests__/index.test.js @@ -45,9 +45,9 @@ test('strikethrough', () => { ]); }); -describe('mention', () => { +describe('mention-here', () => { test('normal', () => { - expect('@here Hello!').toBeParsedAs([['mention', 0, 5]]); + expect('@here Hello!').toBeParsedAs([['mention-here', 0, 5]]); }); test('with additional letters', () => { @@ -55,7 +55,7 @@ describe('mention', () => { }); test('with punctation marks', () => { - expect('@here!').toBeParsedAs([['mention', 0, 5]]); + expect('@here!').toBeParsedAs([['mention-here', 0, 5]]); }); }); @@ -170,7 +170,7 @@ test('codeblock', () => { ]); }); -describe('quote', () => { +describe('blockquote', () => { test('with single space', () => { expect('> Hello world!').toBeParsedAs([ ['syntax', 0, 1], @@ -213,7 +213,7 @@ test('separate blockquotes', () => { ]); }); -test('heading', () => { +test('h1', () => { expect('# Hello world').toBeParsedAs([ ['syntax', 0, 2], ['h1', 2, 11], @@ -237,7 +237,7 @@ test('nested bold and italic', () => { ]); }); -describe('nested heading in blockquote', () => { +describe('nested h1 in blockquote', () => { test('without spaces', () => { expect('># Hello world').toBeParsedAs([ ['syntax', 0, 1], @@ -290,7 +290,7 @@ describe('trailing whitespace', () => { }); }); - describe('after heading', () => { + describe('after h1', () => { test('nothing', () => { expect('# Hello world').toBeParsedAs([ ['syntax', 0, 2], @@ -319,7 +319,7 @@ describe('trailing whitespace', () => { ]); }); - test('multiple quotes', () => { + test('multiple blockquotes', () => { expect('> # Hello\n> # world').toBeParsedAs([ ['syntax', 0, 1], ['blockquote', 0, 9], diff --git a/parser/index.ts b/parser/index.ts index 86cd4b00..f15c85bc 100644 --- a/parser/index.ts +++ b/parser/index.ts @@ -114,7 +114,7 @@ function parseTreeToTextAndRanges(tree: StackItem): [string, Range[]] { addChildrenWithStyle(node, 'code'); appendSyntax('`'); } else if (node.tag === '') { - addChildrenWithStyle(node, 'mention'); + addChildrenWithStyle(node, 'mention-here'); } else if (node.tag === '') { addChildrenWithStyle(node, 'mention-user'); } else if (node.tag === '
') { diff --git a/parser/react-native-live-markdown-parser.js b/parser/react-native-live-markdown-parser.js index a0feb61c..8d4956fc 100644 --- a/parser/react-native-live-markdown-parser.js +++ b/parser/react-native-live-markdown-parser.js @@ -31,4 +31,4 @@ $2`},{name:"removeStyle",regex:/