Skip to content

Conversation

@hugocostadev
Copy link
Contributor

@hugocostadev hugocostadev commented Oct 4, 2022

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 Lin with bold/italic/strike

To fix this behavior it was necessary to edit LinkSpan component in gazzodown package (changes included in this PR) and the grammar/utils files in the fuselage/message-parser repository

Fuselage Pull Request: RocketChat/fuselage#887

Issue(s)

Steps to test or reproduce

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

Further comments

Fuselage Pull Request: RocketChat/fuselage#887

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

TC-91

@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Merging #27003 (d2479a4) into develop (5c4c331) will increase coverage by 0.99%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #27003      +/-   ##
===========================================
+ Coverage    40.27%   41.26%   +0.99%     
===========================================
  Files          845      817      -28     
  Lines        18378    17881     -497     
  Branches      2052     1988      -64     
===========================================
- Hits          7401     7378      -23     
+ Misses       10689    10220     -469     
+ Partials       288      283       -5     
Flag Coverage Δ
e2e 41.26% <ø> (+0.99%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@hugocostadev hugocostadev changed the title [FIX] Message Parser Issues [FIX] Emphasis Elements (italic, strike and bold) in Message Parser Components Oct 10, 2022
@hugocostadev hugocostadev changed the title [FIX] Emphasis Elements (italic, strike and bold) in Message Parser Components [NEW] Emphasis Elements (italic, strike and bold) in Message Parser Components Oct 10, 2022
@hugocostadev hugocostadev marked this pull request as ready for review October 10, 2022 14:43
@guijun13 guijun13 added this to the 5.4.0 milestone Oct 18, 2022
@kodiakhq kodiakhq bot merged commit 19d1dc3 into develop Nov 18, 2022
@kodiakhq kodiakhq bot deleted the parser-issues branch November 18, 2022 11:59
gabriellsh added a commit that referenced this pull request Nov 18, 2022
…ecateSettings

* 'develop' of github.com:RocketChat/Rocket.Chat:
  [NEW] Federation events coverage expansion (#27119)
  [FIX] Message Parser version upgrade (#27284)
  [FIX] Replace regex not compatible with safari (#27294)
  [NEW] Emphasis Elements (italic, strike and bold) in Message Parser Components (#27003)
gabriellsh added a commit that referenced this pull request Nov 21, 2022
…age-ignore-reactivity

* 'develop' of github.com:RocketChat/Rocket.Chat: (23 commits)
  Chore: removing useEndpointData from license api (#26634)
  Chore: Create unique index for `E2EKey` field (#27301)
  [FIX] LDAP "Sync Roles" option doesn't work for custom roles (#26842)
  Chore: UserAvatar wrapper missing key in RoomForeword (#27300)
  Chore: Add deprecation warning to settings (#27295)
  Chore: Refactor LeaveTeam to Typescript (#27197)
  [FIX] Sidebar context menu in searchList (#23830)
  [NEW] Federation events coverage expansion (#27119)
  [FIX] Message Parser version upgrade (#27284)
  [FIX] Replace regex not compatible with safari (#27294)
  [NEW] Emphasis Elements (italic, strike and bold) in Message Parser Components (#27003)
  [FIX] Set default value "false" for global search. (#25568)
  Regression: Custom fields form not showing in user profile nor admin (#27244)
  [FIX] Sort RecordList items in REVERSE chronological order, not FORWARD (#27201)
  Chore: Remove unused css (#27289)
  Chore: also send thread to channel translations (#27242)
  [FIX] Marketplace app details page back-button behavior (#27062)
  Chore: Add tests for omni-jobs & add more context in system messages for jobs (#27048)
  Chore: Fix missing license for forks (#27258)
  i18n: Language update from LingoHub 🤖 on 2022-11-14Z (#27255)
  ...
@ggazzo ggazzo mentioned this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants