fuselage icon indicating copy to clipboard operation
fuselage copied to clipboard

feat(message-parser): Enabling Emphasis elements (bold, strike and italic) inside link label

Open hugocostadev opened this issue 3 years ago • 0 comments

Proposed changes (including videos or screenshots)

Currently, the message parser does not accept Emphasis elements mixed with plain text

[Normal Link - *Bold*, _Italic_ and ~strike~ Styles](https://rocket.chat/) return plain text → Should return a Link with bold/italic/strike

To fix this behavior it was necessary to edit the LinkSpan component in the gazzodown package (Pull Request here) and the grammar/utils files in this Pull Request

Send this markdown text:

[Test with *bold* element](https://desk.rocket.chat/support/rocketchat/ShowHomePage.do#Cases/dv/413244000073043351)
[Test with _italic_ element](https://desk.rocket.chat/support/rocketchat/ShowHomePage.do#Cases/dv/413244000073043351)
[Test with ~strike~ element](https://desk.rocket.chat/support/rocketchat/ShowHomePage.do#Cases/dv/413244000073043351)
[Test with *_~all emphasis~_* elements](https://desk.rocket.chat/support/rocketchat/ShowHomePage.do#Cases/dv/413244000073043351)

Current Behavior:

image

Expected Behavior

image

Issue(s)

Further comments

P.S: Do not merge this until @RocketChat/reactnative team merges this feature in the Mobile app

TC-91

hugocostadev avatar Oct 10 '22 14:10 hugocostadev