stablyai / stablyai/orca

[Bug]: Rich mode falls back to Source mode for lines that only look like reference-style links

Open Beginner friendly
#19,795 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

os:macos
Dominant language
TypeScript
Stars
72.1k
Forks
4.7k
Avg merge
14h 54m
Merged PRs (30d)
520

Description

Operating system

macOS

Orca version

1.4.198

Details

Opening a markdown file in the rich editor falls back to Source mode with the "Editable only in code mode" banner whenever a line starts with a bracketed label followed by a colon, even when the rest of the line is ordinary prose rather than a link destination.

Minimal reproduction: create a markdown file containing this line and open it in Orca.

[Bug]: Backspace at the start of the first line under a heading merges that line's text into the heading

The file opens in Source mode only, with the banner explaining that the file contains reference-style links. It does not contain one. Under CommonMark, [label]: only introduces a link reference definition when everything after it on the line is a link destination, optionally followed by a title — a line with ordinary prose after the label is a paragraph.

Wrapping the line in backticks works around the issue, since the false match no longer applies to a fenced or inline-code span.

Expected: rich mode opens normally for a file whose [label]: lines are prose, and only falls back to Source mode when the file has an actual reference-style link definition (for example [id]: https://example.com).

Related code: getMarkdownRichModeUnsupportedReason in markdown-rich-mode.ts.

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

Start in src/renderer/src/components/editor/markdown-rich-mode.ts at getMarkdownRichModeUnsupportedReason, then open a minimal Markdown file containing the reported prose line in Orca. Verify that prose beginning with a bracketed label and colon stays in rich mode while an actual definition such as [id]: https://example.com still falls back to Source mode.】【。}>tagger 彩神争霸大发json tr? Wait malformed? Need ensure JSON no weird. It is valid string has Armenian? Actually final appears ending

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.