stablyai / stablyai/orca

Markdown preview doesn't render callouts / GitHub-style alerts (> [!note])

Open
#8,441 0 comments 0 reactions 1 assignee View on GitHub

@brennanb2025 is already working on this.

Since Jul 13, 2026.

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

Description

Summary

The built-in Markdown preview renders Obsidian/GitHub callout (alert) blockquotes as plain blockquotes. A block like > [!note] shows the literal [!note] marker instead of a styled callout. This makes notes authored in Obsidian (which relies heavily on callouts) hard to read inside Orca.

Steps to reproduce

Open a .md file containing:

> [!note] Optional title
> Body text of the callout.

> [!warning]
> Another one.

Expected: styled callout boxes (icon + colored border/title), marker line consumed.
Actual: ordinary blockquotes; the [!note] / [!warning] text is shown verbatim.

Root cause (from inspecting the shipped renderer bundle, v1.4.137)

The preview's react-markdown pipeline is:

  • remark: remark-parse, remark-gfm, remark-frontmatter, remark-breaks, remark-math, plus the custom wikilink plugin
  • rehype: rehype-raw, rehype-sanitize (with defaultSchema), rehype-slug, rehype-highlight, rehype-katex

remark-gfm does not implement alert/callout blockquotes — those need a dedicated plugin. There's currently no alert/callout plugin in the chain, so > [!type] falls through as a blockquote.

Proposed fix

Add one plugin to the existing pipeline:

  • Minimal (GitHub alert subset — NOTE/TIP/IMPORTANT/WARNING/CAUTION): add remark-github-blockquote-alert to remarkPlugins (it ships matching CSS).
  • Fuller (Obsidian superset — arbitrary types, inline title on the marker line, foldable [!note]- / [!note]+): a small remark/rehype transform that rewrites a blockquote whose first paragraph starts with /^\[!(\w+)\]([+-]?)\s?(.*)/ into a div.callout.callout-<type>.
Implementation note (gotcha)

Because the pipeline runs rehype-sanitize with defaultSchema, the added callout div / className will be stripped unless you either (a) run the transform after sanitize, or (b) extend the sanitize schema to allow the callout element + class names. Worth accounting for so the styling doesn't silently disappear.

Environment

Orca 1.4.137, macOS (Apple Silicon).

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.