RocketChat / RocketChat/Rocket.Chat.ReactNative

multiline code markdown button in ios is erratic

Open
#7,099 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
2.4k
Forks
1.5k
Avg merge
1d 18h
Merged PRs (30d)
90

Description

Using the multiline code markdown button lead to unexpected result. Ot has been this way for yesrs and is really frustrating.

i tried to upload video but failed.

example 1 :

  • write some comment
  • hit return to start multiline code markdown under
  • hit button for multiline code markdown

expected (vertical bar is were cursir ends up

comment
'''|'''

result

comment''''|''

note: if you do not hit new line before the markdown button the cursor will be in the middle of the six backticks. but all in the same line and will need manually adding lines

further more as for years interpetation of the backticks for multiline code markdown is only interpreted if they are alone on a line. Also trying to fit the cursor at the tip of a finger to paste come code exactly in the middle of 6 backtick, is challenging:
i even expect as behaviour that if i hit the button, it always add this as a new line if not already first caracter, and already add a new line in the middle of the markdown

this way:

here is what would be great
'''
|
'''

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by reproducing the multiline code markdown button flow on iOS, including pressing Return first and pressing it mid-line, then trace the button entry point and existing formatting behavior. Done means the button consistently places the code fences on separate lines and leaves the cursor between them as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.