What happened
A quote chip / file-reference strip in the chat surface shows markdown source
verbatim, including heading markers:
…/path/to/issue.md ### Description
The three # characters render as literal text at small size, and the dense
# strokes read as a cramped/overlapping blob instead of three distinct
hashes.


For reference, the same string rendered locally with the system font stack at
13pt medium is clearly spaced — the cramped look comes from displaying the
markdown marker as plain text in the chip, not from font shaping:

Root cause (verified at source level — not a markdown parse bug)
The markdown pipeline in this build (@astryxdesign/core, packaged as
markdown-body-*.js) parses ATX headings with:
let n = e.match(/^(#{1,6}) +(.*)/);
if (n) { c.push({type:'heading', level:n[1].length, children:W(n[2], o)}), l++; continue }
The regex anchors the markers at line start (^). Running the exact packaged
parse logic:
".analysis/issue-new-messages.md ### Description" → NO MATCH → "###" kept as literal text
"### Description" → MATCH → heading level 3, markers consumed
So the renderer is correct per CommonMark: mid-line ### is not a heading
marker and is emitted as plain text. The problem is presentation-only: quoted
excerpts preserve markdown source (use-message-selection-quote.ts captures
selection.toString().replace(/\s+/g,' ').trim() verbatim), so ### can
land in a chip and render as cramped literal hashes.
Full evidence trail from the shipped build:
- 154 renderer chunks + 5 main bundles + full
@astryxdesign/core source
(1987 files): no code path emits # characters as a level badge; no
"###" literal, no "#".repeat, no CSS content:"#...".
- Font stack is the system default (
-apple-system, BlinkMacSystemFont, ...);
no custom font-feature or negative letter-spacing involved.
Suggested fixes (any of)
- When building a quote/chip from a markdown document, strip heading markers
(^#{1,6} → "") so the chip shows Description instead of
### Description.
- Keep the source verbatim but render literal
# runs with explicit
letter-spacing (or a code/monospace style) so three hashes never look
merged.
- Audit other surfaces that show markdown source as plain text (file
reference previews, raw-source views) for the same verbatim-marker display.
Environment
- App: Maka desktop 0.1.5 (Electron, macOS Apple Silicon)
- Surface: chat / quote reference strip
What happened
A quote chip / file-reference strip in the chat surface shows markdown source
verbatim, including heading markers:
The three
#characters render as literal text at small size, and the dense#strokes read as a cramped/overlapping blob instead of three distincthashes.
For reference, the same string rendered locally with the system font stack at
13pt medium is clearly spaced — the cramped look comes from displaying the
markdown marker as plain text in the chip, not from font shaping:
Root cause (verified at source level — not a markdown parse bug)
The markdown pipeline in this build (
@astryxdesign/core, packaged asmarkdown-body-*.js) parses ATX headings with:The regex anchors the markers at line start (
^). Running the exact packagedparse logic:
So the renderer is correct per CommonMark: mid-line
###is not a headingmarker and is emitted as plain text. The problem is presentation-only: quoted
excerpts preserve markdown source (
use-message-selection-quote.tscapturesselection.toString().replace(/\s+/g,' ').trim()verbatim), so###canland in a chip and render as cramped literal hashes.
Full evidence trail from the shipped build:
@astryxdesign/coresource(1987 files): no code path emits
#characters as a level badge; no"###"literal, no"#".repeat, no CSScontent:"#...".-apple-system, BlinkMacSystemFont, ...);no custom font-feature or negative letter-spacing involved.
Suggested fixes (any of)
(
^#{1,6}→"") so the chip showsDescriptioninstead of### Description.#runs with explicitletter-spacing(or a code/monospace style) so three hashes never lookmerged.
reference previews, raw-source views) for the same verbatim-marker display.
Environment