keybase / keybase/client

Minor Keybase GUI chat bug: improper Markdown termination of italics

Open
#25,697 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
9.2k
Forks
1.3k
Avg merge
12h 58m
Merged PRs (30d)
56

Description

On the macOS version of the Keybase GUI (6.0.4-20230113191846+6e1343b357), I found a very small bug on the Markdown processing.

When emoting with `/me`, by convention, the line is output in italics. However, if the _last_ element on the line is prefixed by `@` (i.e. a username, a channel name, etc.), this breaks the italics. What happens is that the trailing `_` will become part of the name being mentioned, thus further breaking _that_ functionality (the GUI will still think that `@` mentions a user or a team — when hovering over it, you still get the appropriate popup window asking for "User or team?" and suggesting a lookup _with the trailing `_`_, which of course will fail).

The same happens when italicising things, of course, not only when emoting.

Note that the issue only happens when you _terminate_ a sequence of italics with a `@` mention. It does _not_ happen if the `@` mention appears in the middle of the sentence. A quick workaround for this is just to add an extra space before terminating the italics (which won't be visible anyway)

Here is an image showing what I mean:

![broken-italics-markup](https://github.com/keybase/client/assets/304404/2a49f754-b1d5-43c5-9b34-c2ee9b1dd1ea)

That should be easy enough to fix on your Markdown parser :-)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Markdown parser used by the macOS GUI and reproduce the case where an italicized line ends with an @mention. It is done when the closing italic delimiter is not included in the mention, while @mentions in the middle of italic text continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.