Markdown preview doesn't render callouts / GitHub-style alerts (> [!note])
@brennanb2025 is already working on this.
Since Jul 13, 2026.
- 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(withdefaultSchema),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-alerttoremarkPlugins(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 ablockquotewhose first paragraph starts with/^\[!(\w+)\]([+-]?)\s?(.*)/into adiv.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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.