Markdown Rendering
Founder order 2026-10-30 (ANUKA #4732): text from ANUKA Core reached users as raw, unformatted walls — markdown symbols visible, no structure. This standard ends that: everywhere a user reads Core text, it is rendered as formatted markdown. Raw text is a defect.
1. Where rendering is mandatory
Section titled “1. Where rendering is mandatory”Markdown rendering is REQUIRED for every user-visible rendering of a Core text field:
- task descriptions;
- task updates and comments of every kind (progress, result, blocker, note);
- goal descriptions and goal updates;
- activity feeds (Dashboard is the first surface — it is the one from the founder’s screenshot);
- inbox items, decision cards and notification bodies rendered inside apps;
- human and agent messages rendered from Core records (Team App, Mentor, Widget rooms, letters);
- any future surface that renders a Core text field inherits this standard by default — opting out needs a recorded exception here.
NOT markdown (rendered as plain text, never parsed): titles, names, one-line labels, button and chip text. Parsing those would mangle ordinary names.
2. One component — no private parsers
Section titled “2. One component — no private parsers”There is exactly ONE markdown component in ANUKA: the shared package extracted from the Goals App formatter (package task ANUKA #4733 — the Goals formatter is the founder-designated reference). Surfaces consume that package; no surface ships its own parser or renderer, and no surface hand-rolls a subset.
A substitution of the reference implementation is valid only when it is documented with rationale in #4733 before surfaces implement against it, and noted in this standard. Silent local forks are an acceptance failure.
3. Supported syntax — the required subset
Section titled “3. Supported syntax — the required subset”Every surface must render, identically:
- paragraphs and line breaks;
- headings
#–######; - bold, italic;
- unordered and ordered lists, nested up to 3 levels;
- links (see §4 for the href allowlist);
inline codeand fenced code blocks;- blockquotes.
Extended constructs — tables, task lists, images, horizontal rules,
strikethrough — render when the shared package supports them; until then
they degrade to readable text, never to raw HTML. Bare URLs are NOT
autolinked — linkify is off, exactly as in the Goals reference
(fixed by the #4733 package, WEB.md); a clickable link needs link syntax.
4. Sanitization — non-negotiable
Section titled “4. Sanitization — non-negotiable”Core text is written by humans and agents; it is untrusted input.
- Raw HTML in the source is NEVER rendered or executed — it is escaped to visible text or stripped by the package’s sanitizer.
- Link
hrefallowlist:https:,http:,mailto:, and same-app relative links.javascript:,data:,vbscript:and any other scheme render as plain text, not as a link. - Images render from
http:/https:URLs only — the parser cuts the dangerous schemes (javascript:,data:,vbscript:); a broken image degrades to its alt text. (Ruling 2026-11-01, #4741: the standard follows the reference parser here; script-bearing schemes are the actual risk and they are blocked.) - No iframes, embeds, forms or scripts can be produced from markdown, ever.
- The acceptance probe (§6) contains live XSS attempts; any execution is an automatic FAIL for the surface.
5. Presentation — ANUKA tokens, not browser defaults
Section titled “5. Presentation — ANUKA tokens, not browser defaults”Rendered markdown inherits the surface’s typography and the platform tokens. Precedence (ruling 2026-11-01, #4741): structure and typography come from the package CSS (WEB.md §3); the presentation tokens below — link colour, code-block surface and radius, quote bar — are set by THIS standard and override the package CSS defaults on ANUKA surfaces. The React Native path uses the package’s own styles as-is.
- links in the action colour (
#00D4FF), underline on hover/focus, never browser blue/purple, visited state unchanged; - inline code — monospace on the nested surface colour; code blocks — nested
surface (
#151D2E), radius 14px, horizontal scroll, no wrapping; - blockquote — 2px left border in the neutral state token, muted text;
- headings scale INSIDE the content region and never exceed the surface’s own page-title size;
- lists use standard markers with compact spacing — the render must not import a browser-default stylesheet look;
- structure is part of the format, never a browser default: paragraph spacing, heading weight and list markers/indent (including nested lists) are carried explicitly by the package CSS (WEB.md §3, structural compensation block). On stacks whose reset removes browser defaults (e.g. Tailwind preflight), omitting that block is a defect — lists without markers fail §6 (finding of ANUKA #4740, verified 2026-11-01);
- dark theme only, like every ANUKA surface.
Empty text renders as nothing — never the strings “undefined” or “null”. Very long content follows the surface’s existing truncation/expansion rules.
6. Acceptance — the second leg (UX & PM)
Section titled “6. Acceptance — the second leg (UX & PM)”The canonical probe is the package’s own control text —
examples/control-text.md in the anuka-md repository (block A:
formatting; block B: sanitization) — pasted into a real task description
AND a real update on stage; a byte-identical copy in the surface’s repo
is the evidence anchor. (Ruling 2026-11-01, #4741: one probe, the
package’s; the text below is an equivalent short form, kept for
reference.)
# Probe heading 1## Probe heading 2
A paragraph with **bold**, *italic*, `inline code`, a [link](https://anuka.pro) and a bare URL https://anuka.pro.
- Bullet one- Bullet two - Nested bullet
1. First step2. Second step
> A quoted line from a teammate.
```code blockline two```
<script>alert("xss")</script>[click](javascript:alert(1))<img src=x onerror="alert(2)">A surface PASSES the second leg when all of these hold on stage:
- The lane’s result carries before/after screenshots with the probe in real records (description + one update).
- UX & PM’s own stage pass (ux-stable account) confirms: every construct
of §3 renders formatted; zero raw markdown symbols are visible; the
three XSS probes do nothing (script shown as text or stripped, the
javascript:link is not a link, the img payload never fires). - Plain text without any markdown still reads correctly — line breaks preserved, no swallowed characters.
- The lane’s result names the shared package it consumes (§2) — a private parser is a FAIL even if the screenshots look right.
FAIL returns the surface to the lane with the specific construct or probe named. Stage acceptance is phase A of the two-phase gate; production ships only through the #4053 release windows.
Standard owner: ANUKA UX & Design (M2). Umbrella: ANUKA #4732. Reference package: ANUKA #4733 (Goals App formatter).