Jump to content

RefractTrack Markdown Formatting

From Pixel Refraction Studio
Revision as of 23:21, 27 August 2026 by Nerdofepic (talk | contribs) (Created page with "== Markdown Formatting == Free-text fields (task descriptions, comments, bug fields) support a small, purpose-built markdown subset — not a full CommonMark implementation. A help modal in the app documents this for end users; this page is the reference version. === Block-level syntax === {| class="wikitable" ! Syntax !! Result |- | <code><nowiki># Heading</nowiki></code> || Heading (rendered as <code><nowiki><h4></nowiki></code>) |- | <code><nowiki>## Heading</nowik...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Markdown Formatting

Free-text fields (task descriptions, comments, bug fields) support a small, purpose-built markdown subset — not a full CommonMark implementation. A help modal in the app documents this for end users; this page is the reference version.

Block-level syntax

Syntax Result
# Heading Heading (rendered as <h4>)
## Heading Smaller heading (rendered as <h5>)
- item or * item Bullet list item
1. item Numbered list item
Two spaces of indent per level Nests list items
```lang ... ``` Fenced code block, with optional single-line syntax highlighting for csharp and json
(blank line not required) Plain lines are joined with line breaks

Mixing list markers at the same nesting depth (e.g. switching from - to 1. mid-list) closes the old list and opens a new one of the new type at that depth, matching how most lightweight markdown parsers behave.

Inline syntax

Syntax Result
**bold** bold
*italic* italic
++underline++ underlined text

Code blocks and syntax highlighting

Fenced code blocks (```) support an optional language tag right after the opening fence (e.g. ```csharp). Syntax highlighting is a hand-rolled, best-effort, line-by-line regex highlighter for csharp and json — not a real tokenizer, so it can occasionally be fooled by a keyword-looking substring inside an already-highlighted token. This is an accepted trade-off in exchange for no additional dependencies. Comments are only recognized within a single line; there is no multi-line comment tracking.

Task-code auto-linking

Anywhere rendered markdown text contains something matching a task-code pattern (PREFIX-123, e.g. FE-12), RefractTrack automatically checks whether it resolves to a real task and, if so, turns it into a link to that task's detail page. If the viewer doesn't have permission to view tasks, or the code doesn't resolve to a real task, it's left as plain text.

Live preview

The task form and comment box include a live preview panel (js/markdown-preview.js) that renders the same markdown subset client-side as you type. This preview logic is kept in byte-for-byte lockstep with the server-side renderer — any change to the server-side markdown rendering rules should be mirrored here to avoid the preview drifting from what actually gets saved and displayed.