keybase / keybase/client

Broken linkification from inconsistent Markdown processing

Open
#24,797 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
9.2k
Forks
1.3k
Avg merge
12h 58m
Merged PRs (30d)
56

Description

Parsing of ```…``` "fence" blocks and `…` inline code in ReplaceQuotedSubstrings does not match that of shared/common-adapters/markdown/shared.tsx, and as a result links are incorrectly detected.

For example:

  • ``code` renders as «`code», while ``https://example.com/` renders as «`$>kb$…$<kb$» with a preview box.

  • ```\```fenced``` renders as

    \```fenced
    

    while ```\```https://example.com/``` renders as

    `
    ``\
    `
    `$>kb$…$<kb$

    with a preview box.

  • ```code``````https://example.com/``` renders as

    code```
    

    https://example.com/
    `
    ``

    (in which https://example.com/ is not a link)

Contributor guide

No contributing guide indexed for this repository

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

Compare Markdown handling in go/chat/utils/utils.go at ReplaceQuotedSubstrings with shared/common-adapters/markdown/shared.tsx, focusing on fenced and inline code. Reproduce the listed examples and trace where link detection diverges. Done means both paths handle the examples consistently without creating incorrect links or previews.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, typescript
Domain
full-stack
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.