Files
Marcos Paulo 2be0e6586e fix: markdown fidelity in the core crates: fences, math environments, text blocks
CommonMark fence scanner (a closing fence is at least as long as the opening one, tilde fences, quote prefixes), used by every fence scan in the note view; math: Bmatrix, Vmatrix, smallmatrix, array, align, hline, lenient parse where an unknown command becomes one red atom; plain/text/txt code blocks are no unknown language; corpus test against pulldown-cmark over the help vault (0 disagreements on 179 notes). Adds the render audit of the help vault (20 findings).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 23:59:11 -03:00

26 KiB

NotesCraft Markdown render audit (obsidian-help-all)

Date 2026-10-20. Vault ~/Documents/vaults/obsidian-help-all. Read-only audit: no source file touched. Not repeated here (other agent owns them): nested/longer fences, fenced code and tables inside callouts, U+2A33 glyph, vmatrix/matrix, mermaid fallbacks, escaped pipes with wikilinks in tables.

Coverage

  • Inventory by regex over 179 en/ notes and 122 Release notes/ (construct counts in the table).
  • 44 real notes rendered with the snapshot example (Visual view, mocha), each PNG read against its source. PNGs: scratchpad/audit/n1..n44.png (list in list.txt, same order). 1 of them (Style guide) CRASHES the snapshot (finding F9).
  • 13 throw-away mini notes in scratchpad/audit/mv/ (a..l) to isolate every cause; PNGs m1..m13.png.
  • Parser check: CLI links on all 179 en/ notes vs independent regex counts of wikilinks and embeds: 178 equal, 1 differs only because my regex does not strip a fence inside a callout (the known callout-fence bug). tags vs regex: equal. Parser/index side is sound; every bug below is in RENDERING (note view) not parsing.
  • Source view not compared note by note (no source flag beyond --source; I looked at none); not audited.
  • Notes audited: 44 real + 13 mini = 57 renders; 301 notes by inventory; 179 by CLI.

Summary table

Id Construct Status Notes affected Severity
F1 Text before an inline marker (** before a wikilink/code, lone * _ ~ backtick) is DROPPED BROKEN 75 (**[[), 8 (** code), 19 intraword _ data loss
F2 Same-note link [[#Heading]] without alias renders empty; [[N#H]] shows only N BROKEN 31 (134 links) wrong content
F3 Backslash escapes (\*, \[\[, |) not honoured, \ hard break BROKEN 9 + 2 wrong content
F4 Markdown images ![alt](path) and ![250](url) not rendered BROKEN 8 en + 12 release (5 local) wrong content
F5 ![[x.svg#icon]] and other embeds inside a paragraph/list item/callout/table cell BROKEN 55 icons, 41 in lists, 8 in callouts wrong content
F6 Inline markup in callout titles (**b**, code, [[link]], _i_) shown raw BROKEN 26 wrong content
F7 Tab-indented sub-lists show a literal - BROKEN 17 en + 46 release cosmetic (reads wrong)
F8 Raw HTML (<kbd> <br> <u> <s> <small> <img> <span> <p/>, entities) shown as text BROKEN 9 en + 50 release wrong content
F9 Embedded image wider than max texture side PANICS (egui) BROKEN 476 big PNGs in the vault; Style guide crash
F10 Multi-line $$ ... $$ display math falls back to red source (even x^2) BROKEN 1 vault note, any user note wrong content
F11 Block id ^abc shown literally BROKEN 10 cosmetic
F12 Nested callouts > > [!todo] shown as literal text BROKEN 1 (Callouts.md) wrong content
F13 Bare URLs not linked; [x](a%20b.md) unresolved PARTIAL 12; few cosmetic
F14 Code font ligatures change shown characters (!= to ≠, -> to arrow, <!--) BROKEN every code block with those wrong content (code)
F15 Double-backtick code spans ( ``` ) render empty / lose a backtick BROKEN 2 wrong content
F16 Horizontal rule --- *** not drawn BROKEN 4 cosmetic
F17 Plain blockquote has no bar and is italic; ordered list: plain text, no hanging indent PARTIAL many cosmetic
F18 Custom task status [/] [-] [>] shown as bullet with literal [/] PARTIAL 1 cosmetic
F19 Footnote ref shows label (note) not number; #1984 shows a stray box glyph; #日本語 not a tag PARTIAL few cosmetic
F20 Heading with inline markup/wikilink: markers stripped, link shown as `[ [ Settings link ] ]` BROKEN 0 in this vault (any user note)

Rendered CORRECTLY (coverage)

ATX and setext headings; paragraphs; **bold** *it* _it_ ~~strike~~ ==highlight== in plain text; inline code; fenced code with language and copy button; callouts of all standard types, custom types, titles, foldable -/+, title-only, body with wikilinks and lists; tables with alignment, inline code, wikilinks, bold, icon embeds (check marks in Catalyst license); wikilinks with alias and cross-note heading/block; note, heading and block embeds with breadcrumb chip; missing-target notice; image embed with |100 and |100x145; footnote definitions and inline ^[x]; %%comments%% hidden; tags and nested tags; inline math; mermaid sequence/flow diagrams (not the known failures); properties panel (text, list, number, checkbox, date, tags, aliases, link, nested as "complex value"); autolinks <https://..>; [text](<url>); [md](Note.md); [x](Note.md#H); hard break by two spaces; CJK and emoji text; YAML/Bases code blocks (tilde fence with inner backtick fence); task - [ ] - [x]; space-indented nested lists; unresolved link colouring.


F1 Dropped text before an inline marker (data loss, top priority)

Repro (mv/a.md, mv/b.md, PNG m1.png, m2.png):

Pre **[[Settings]]** post.            -> shows "Settings post."  ("Pre " lost)
1. Open **[[Settings]]**.             -> shows "Settings."       ("1. Open" lost)
Lead words my_var then more text.     -> shows "var then more text."
Lead words 5 * 3 = 15 trailing.       -> shows " 3 = 15 trailing."
Lead words a lone ` tick.             -> shows " tick."
my_var_name x * y                     -> "my" + italic "var" + " y"  (should stay literal)

Real notes: Basic formatting syntax.md:58 ("Obsidian includes a" lost, PNG bfs.png), :62, Properties.md:23,67,39-45, Templates.md:78 (PNG n16), Internal links.md:39, 75 notes with **[[. Obsidian: all text kept; wikilink inside bold shown bold; underscores inside a word are literal. Cause: crates/ui-egui/src/views/note_view/inlines.rs:132-197 scan_inline. Every "no closing marker" arm does None => pos = at + 1 (or + 2) without first emitting text[pos..at]; the final push_plain(text[pos..]) then starts after the marker. Lines are split at items (wikilink, link), so ** before a wikilink never finds its close inside the segment. Also _ has no word-boundary rule (the crates/editor/src/inline.rs:128 underscore_ok has one: reuse), and the scanner does not nest (**\code`**shows raw backticks,Properties.md:23). Fix idea: keep a separate plain_start; on a non-matching marker keep scanning without moving it; flush text[plain_start..at]` only when a span is pushed; emit the marker as plain text. Better: make bold/italic/strike span items cover wikilinks and code (Span::Styled with children).

Repro (mv/h.md, PNG m8.png):

## Target
Self link [[#Target]] and [[#^blk]] ok.     -> "Self link  and  ok."  (link invisible)
[[Settings#Strict]] [[Settings#^blk1]]      -> shown "Settings" (Obsidian: "Settings > Strict")

Real: Glossary.md (every entry: "An alias is a type of that defines ..." PNG n22), Properties.md:39-45 (7 EMPTY bullets, PNG n3), Callouts.md:12, Internal links.md ("will create a link to ."), Catalyst license.md:52, Tags.md, How Obsidian stores data.md:46. 31 notes, 134 links. Cause: inlines.rs:107-110 push_item_span: shown = alias.unwrap_or(target); for [[#H]] target is "" and subpath is ignored. Embeds already build the label with subpath (blocks/embed.rs:176 label()): reuse it. Severity: wrong content (sentence meaning lost).

F3 Escapes and backslash break

\*not bold\* after                       -> "\" + italic "not bold" + "\"   (m2.png)
disable **Use \[\[Wikilinks\]\]**.       -> centered italic "[Wikilinks"      (Internal links.md:40, n8)
\**This line will be italic and show the asterisks*\*   (Basic formatting syntax.md:146)
Line a\<newline>line b                   -> literal "\" at line end            (m11.png)

Cause: scan_inline (inlines.rs:132) has no \ rule; backslash break not handled in line/paragraph code (lines.rs/flow.rs; two-space break works). Fix: in scan_inline treat \ + ASCII punctuation as a literal char (drop the \); a trailing \ at line end is a hard break.

F4 Markdown images

![Example of a base](bases-noshadow.png#interface)   (Bases/Introduction to Bases.md, PNG n12)
![250](https://publish-01.obsidian.md/.../Engelbart.jpg)   (Linking notes and files/Embed files.md, n9)
![alt text](Engelbart.jpg)                                  (mv/l.md, m13.png)

We print the raw ![..](..) text. Obsidian shows the image (width from numeric alt). Wikilink image ![[Engelbart.jpg|60]] works. Cause: the markdown crate yields ItemKind::Link for [..](..) and nothing for the ! form, so inlines.rs:111 renders Span::Link/plain; no embed path. Needs ItemKind::Image (or flag) in crates/markdown/src/scanning/*.rs and a call into blocks/embed.rs::show for local files (remote: only if network images are allowed; otherwise a placeholder chip with alt and URL, never raw syntax).

F5 Embeds that are not alone on their line

1. In the bottom-left corner, select **[[Settings]]** ![[lucide-cog.svg#icon]].   (Plugins/Templates.md:14, n16)
- In the note, select **More options** ![[lucide-more-horizontal.svg#icon]], and then ...   (Obsidian URI.md, n21: raw text)
> ![[Engelbart.jpg]]       (Callouts.md callout body, n1: raw text; `![[Credits#^lucide]]` too)
| ![[Settings]] | **x** |   (mv/j.md: raw text in a table cell)
The ribbon ... ![[lucide-menu.svg]] ...  (Glossary.md: icon on its own line, sentence broken)

Obsidian draws the icon inline at text size. Ours: block card on its own line (splits the sentence and drops the words before it), raw text in list/callout/table, or nothing. 55 notes use inline svg icons, 41 embeds sit in list items, 8 in callouts. Cause: embeds are only handled as a whole-line block in blocks/embed.rs:68 show (called from note_view/blocks.rs/embed.rs:287); no inline Span::Embed, and the list/callout/table line painters do not call it. Table cells render icon embeds fine (Catalyst license) so reuse that path for inline svg.

F6 Callout title inline markup

> [!tip] In _Live Preview_, you can ... (italics literal, Advanced formatting syntax, n-adv); > [!todo] [[#Set your template folder]] before inserting... (raw wikilink, Templates.md:82); > [!warning] If Apple's [Lockdown Mode](<https://..>) is enabled (raw, How Obsidian stores data.md:48); > [!tip] Adding \.obsidian` to Git(raw backticks);HTML content.mdiframe callout. 26 notes. Cause:note_view/blocks.rs:123-125: Span::Bold(shown)with the raw title string. Fix: runspans_for_line/scan_inline` over the title with bold weight and the callout colour.

F7 Tab-indented sub-lists

- [[Core plugins]]
<TAB>- Choose which built-in features ...     -> "- Choose ..." with literal dash, no bullet  (Home.md, Bases/*, Create a base.md)

17 en + 46 release notes. Space indent works (m9.png). Tabs: indent width is already handled (lines.rs:163 indent_spaces, test says "a tab is four columns") but the bullet test trims only spaces: lines.rs:143 trim_start_matches(' ') (and :36, :53 for quotes). Use trim_start_matches([' ', '\t']) and check list_marker consumers in painting.rs/blocks.rs.

F8 Raw HTML

<kbd>Ctrl</kbd>, line<br>break, &amp; &nbsp;, <details><summary>, <u>x</u>, <s>, <small>Released ...</small> (every release note header, v1.2 n42), <img alt=.. src=..> (v1.2: raw), <p/> and <br /> inside table cells (Plugins/Search.md, n18), <span style=...> in HTML content.md, <kbd> lists in Release notes. 9 en + 50 release notes use them outside code. Obsidian renders sanitized HTML. Minimum: <br> as line break, <kbd> as key chip (the app already has a key chip look in code), <u> <s> <sub> <sup> <mark> <small> <p> as styling, entity decoding, <details> as a foldable, <img src> as embed. Strip unknown tags instead of printing them. Cause: no HTML handling in crates/markdown scan nor inlines.rs. HTML comments <!-- --> are hidden in Obsidian.

F9 Panic on a large embedded image

Contributing to Obsidian/Style guide.md embeds Style-guide-modal-example.png (3324x2008): snapshot dies with Texture "bytes://notescraft/embed/<fp>/en/Attachments/Style-guide-modal-example.png" has size 3324x2008, but the maximum texture side is 2048 (egui context.rs:2399). 476 PNGs in this vault exceed 2048. Real GPUs allow 8192-16384, but low-end/software paths and the offscreen harness give 2048, and AGENTS.md says "Never crash". Cause: embeds go through egui's bytes loader unchanged (shell/attachment_drop/images.rs:158, blocks/embed.rs), whereas views/image_view/mod.rs:153 already passes max_texture_side to its loader and downsizes. Reuse that.

F10 Multi-line display math

$$
x^2 + y^2 = z^2
$$

renders as red monospace source (m7.png, m6.png); the same text as $$x^2 + y^2 = z^2$$ on one line renders correctly. \int_0^1 x\,dx and \frac12 also fail (m6.png: \, and unbraced \frac12 unsupported). Vault: Advanced formatting syntax (vmatrix, known) but this is broader than vmatrix: any multi-line block. Cause not found by reading: blocks.rs:50 display_math passes item.range slice minus $$ (src starts with \n); crates/math/src/syntax/parse.rs:56 skips whitespace, so check crates/ui-egui/src/math_view* error path and the math crate being edited by the other agent; re-test after their change before assigning. Also Inline $a$ and $$d$$ end. on one line replaced the whole paragraph by the display formula (rare).

F11 Block ids

... network of knowledge. ^b15695 (Internal links.md:8), Templates.md, Properties.md, Credits.md, Publish limitations.md, Refund policy.md show ^id text; Obsidian hides it in Reading view. Embedded blocks also include the ^id (m8.png). Cause: inlines.rs:110 _ => Plain; ItemKind::BlockId exists in markdown (lib.rs:122). Hide it (like Comment) in the visual view.

F12 Nested callouts

> [!question] Can callouts be nested? / > > [!todo] Yes!, they can. / > > > [!example] ... (Callouts.md:67-80, n1): inner shown as plain [!todo] Yes!, they can. lines. Cause: markdown/src/scanning/scan.rs:~150 callout() only recognises a header at quote depth 1; blocks.rs:103 paints one card. Needs a recursive card.

Bare https://example.org/x stays plain (12 notes; Update Obsidian.md, Custom domains.md, SEO.md). [enc](My%20File.md) shown as unresolved link (red) although My File.md exists; Obsidian decodes %20. Cause: markdown crate links.rs has no bare-URL item; resolver in Link handling does not percent-decode.

F14 Code ligatures change meaning

In inline and fenced code: status != "done" shows ≠ (Bases syntax.md n14), x -> y a long arrow, a >= b ≥, => ⇒, !== struck equals, <!-- c --> becomes <!⟵ c ⟶> (HTML content.md n6), mermaid Alice->>+John shows →>. i.m10.png. In a help vault whose job is showing syntax, readers copy wrong characters visually. Cause: mono font with calt/liga; disable ligatures for the code font (crates/ui-egui/src/design/ font setup, fonts.rs currently being reworked in the tree: check crate::fonts::*) or pick a font without them.

F15 Double-backtick spans

``` (Obsidian Flavored Markdown.md:37, n2: empty cell), ab`` `` shows ab. Cause: scan_inlinebacktick arm (inlines.rs:141) matches single backticks only, andcrates/editor/src/inline.rs:62 inline_code` handles runs: reuse its run logic.

F16-F20 smaller items

  • F16 ---/*** in body draws nothing (4 notes, m11.png). Add a rule line in the block painter.
  • F17 Plain > quote has no bar and italic (m4.png): Obsidian draws a left bar, normal text. Ordered list items paint as plain text 1. text (no hanging indent on wrap; Home.md n40, Catalyst n36). Cosmetic.
  • F18 - [/] - [-] - [>] show a bullet and literal [/] (Plugins/Templates.md source, m3.png). Obsidian draws a checkbox with the char as state.
  • F19 footnote ref label shows the label text (note) where Obsidian numbers refs 1,2,3; #1984 (not a tag) is preceded by a stray empty box glyph (Tags.md:51, m10.png); #日本語 not tagged (Obsidian allows Unicode tags).
  • F20 # Heading with \code` and bold and Settingsshows "Heading with code and bold and [ [ Settings|link ] ]": markers stripped, no styling, wikilink broken (m3.png). Not in this vault; user notes will have it. Heading painter innote_view/painting.rsbypassesspans_for_line`.

Fix briefs (repo template). Order: B1 first (it also unblocks B2/B3), then B2..B7. Each owns different files except B1/B2/B3 which all touch inlines.rs (run B1, B2, B3 in sequence or merge into one agent).

B1 TASK inline-scanner: no dropped text, escapes, nesting, intraword underscore, double backticks (F1 F3 F15)

Runs through OpenCode (specs/agents/opencode-runbook.md is attached automatically).

OWNS

crates/ui-egui/src/views/note_view/inlines.rs (+ a new crates/ui-egui/src/views/note_view/inlines_tests.rs if the 400-line limit is hit; register with #[cfg(test)] mod).

FILES TO OPEN

inlines.rs (scan_inline at ~132, push_item_span ~102, tests at the bottom), crates/editor/src/inline.rs (marker_pairs, underscore_ok, inline_code run logic to copy), views/note_view/painting.rs (how Span::Bold/Italic/Mono paint).

GOAL / API

scan_inline never loses bytes: every input char is either in a span or printed. Rules: (1) unmatched marker is literal text and does NOT move the plain start; (2) \ + ASCII punctuation prints the punctuation only; (3) _ italic only at word boundaries (my_var_name stays literal); (4) code spans honour backtick runs of any length ( `` ``); (5) bold/italic/strike may wrap Wiki/Link/Mono items:spans_for_linemust pass a style flag soAis a bold link and`x`bold mono (addbold: booltoSpan::Wiki/Monoor aSpan::Styled). Keep byte ranges used by selection (byte_ranges_survive_unicode` test).

TESTS

In inlines.rs tests: Pre **[[S]]** post yields Plain("Pre ") + Wiki + Plain(" post"); my_var then unchanged; 5 * 3 unchanged; \*x\* yields "x" plain; `` `` yields Mono(""); concatenation of all span text equals input minus delimiters (property check on a list of 20 tricky lines). UI test: crates/ui-egui/tests/ copy image_view.rs pattern or snapshot mv/a.md equivalents.

VERIFY

cargo test -p notescraft-ui-egui inlines, cargo clippy -p notescraft-ui-egui --all-targets -- -D warnings, rustfmt --edition 2024 <files>, snapshot Basic formatting syntax.md and read the PNG.

DO NOT

Touch crates/markdown, the editor crate, Cargo files, or the callout painter.

OWNS

crates/ui-egui/src/views/note_view/inlines.rs (only push_item_span), crates/ui-egui/src/views/note_view/blocks/embed.rs only if exporting label() (pub(super)).

FILES TO OPEN

inlines.rs:102-130, blocks/embed.rs:176 label, crates/markdown/src/lib.rs:100-130 (ItemKind::WikiLink{target,subpath,alias}, BlockId).

GOAL / API

Wiki label: alias if present; else target + > + heading (or ^id) when subpath present; for empty target ([[#H]]) the heading alone. Click target unchanged. ItemKind::BlockId renders nothing in the visual view but stays in source and in embeds (strip the id from embedded block text).

TESTS

Unit tests in inlines.rs: [[#Target]] shown "Target"; [[Settings#Strict]] "Settings > Strict"; [[S#^b1]] "S > ^b1"; alias wins. Block id hidden.

VERIFY

as B1; snapshot en/Getting started/Glossary.md and en/Editing and formatting/Properties.md: no empty bullets.

DO NOT

Change link resolution or the markdown crate.

B3 TASK callout titles with inline markup (F6) and heading inline markup (F20)

OWNS

crates/ui-egui/src/views/note_view/blocks.rs (callout header at 103-130), the heading painter in views/note_view/painting.rs (find with grep -n heading painting.rs).

FILES TO OPEN

blocks.rs:100-135, inlines.rs spans_for_line/scan_inline (needs B1 first), painting.rs.

GOAL / API

Title and heading text go through the same span builder as body text, with bold weight and callout colour; wikilinks in titles are clickable.

TESTS

render_tests.rs (blocks/ has render_tests.rs): title **b** \c` N i` yields spans Bold/Mono/Wiki/Italic.

VERIFY

as B1; snapshot Plugins/Templates.md (line 82 callout) and mini heading note.

DO NOT

Alter callout fold behaviour or colours.

B4 TASK inline embeds, markdown images, embeds in lists/callouts/tables (F4 F5)

OWNS

crates/markdown/src/scanning/scan.rs (+ lib.rs ItemKind::Image{alt,dest,width} and links.rs if Link extraction must skip it), crates/ui-egui/src/views/note_view/blocks/embed.rs, inlines.rs (new Span::Embed), list/callout/table row painters in note_view/painting.rs, blocks/table.rs.

FILES TO OPEN

blocks/embed.rs:68 show, :123 media_card, blocks/table.rs (icon embeds already work in cells: copy), markdown/src/lib.rs, scanning/scan.rs, shell/attachment_drop/images.rs:158 (image loader).

GOAL / API

(a) ![[x.svg#icon]] and any ![[img|N]] found inside a paragraph, list item, callout line or table cell paints inline (svg at text height; raster at its size) without breaking the line; note/heading embeds stay block-level only when alone on the line. (b) ![alt](path[#frag]) and ![N](path)/![WxH](path) embed local images via the same loader (percent-decode the path, resolve like wikilinks); remote http(s) images show a chip with the alt text and open on click (no network fetch unless a setting exists). Never print raw ![..](..).

TESTS

markdown crate: item for ![a](b.png) and ![250](u); ui: kittest or unit test in blocks/render_tests.rs that an inline svg embed inside - text ![[a.svg]] more keeps all words and emits one image.

VERIFY

cargo test -p notescraft-markdown, cargo test -p notescraft-ui-egui, cargo xtask layers, snapshot Plugins/Templates.md, Extending Obsidian/Obsidian URI.md, Bases/Introduction to Bases.md.

DO NOT

Add dependencies, change craft-* crates, or touch math/diagrams.

B5 TASK tab-indented lists, hr, blockquote, ordered lists (F7 F16 F17 F18)

OWNS

crates/ui-egui/src/views/note_view/lines.rs, painting.rs (list/quote/rule painting), crates/markdown/src/scanning/scan.rs::list_marker only if it rejects tabs (it accepts them).

FILES TO OPEN

lines.rs:30-60,140-170, painting.rs, tests in lines.rs:265.

GOAL / API

Leading whitespace = spaces or tabs everywhere a list/quote is detected. Draw a thin tokens.theme.colors.* line for ---/***/___. Blockquote: left bar, normal weight. Ordered items: hanging indent like bullets. [/] [-] [>] [?] etc: checkbox with state glyph.

TESTS

unit: "\t- a" is a bullet at depth 1; "\t\t- b" depth 2; rule detection; quote depth with tabs.

VERIFY

as B1; snapshot en/Home.md, en/Bases/Create a base.md.

DO NOT

Change fence handling or callouts.

B6 TASK raw HTML subset and entities (F8)

OWNS

crates/markdown/src/scanning/ new html.rs (inline tag scan, tags br kbd u s del sub sup mark small p span a img b i strong em code, comments <!-- --> hidden, entities &amp; &lt; &gt; &nbsp; &#NN;), inlines.rs mapping to spans, table-cell <br>.

FILES TO OPEN

scanning/scan.rs (add the scan next to callout), lib.rs ItemKind, inlines.rs.

GOAL / API

ItemKind::HtmlTag{name,closing}; unknown tags dropped, text kept; never allocate more than input length; no panics on < without >. <details>/<summary> as a foldable block can be a second step.

TESTS

markdown unit tests including hostile inputs (<, <<<, &#99999999;, unclosed comment). UI: a<br>b gives two lines; <kbd>Ctrl</kbd> chip.

VERIFY

cargo test -p notescraft-markdown, clippy pedantic, snapshot Release notes/v1.2.md, Plugins/Search.md.

DO NOT

Execute or fetch anything from HTML; do not add a dependency.

B7 TASK never panic on big images (F9)

OWNS

crates/ui-egui/src/shell/attachment_drop/images.rs (and blocks/embed.rs only if the loader call lives there).

FILES TO OPEN

images.rs:100-170, views/image_view/load.rs (max_side downsizing: copy), views/image_view/mod.rs:153.

GOAL / API

Before registering bytes://notescraft/embed/..., decode and downscale (Lanczos/triangle) any side above ctx.input(|i| i.max_texture_side); on decode failure show the existing "cannot load" notice.

TESTS

unit test with a generated 3000x100 PNG: result side <= 2048 and aspect preserved; kittest of a note embedding it does not panic with max_texture_side = 2048.

VERIFY

snapshot en/Contributing to Obsidian/Style guide.md exits 0.

DO NOT

Change craft-* crates.

B8 TASK code font ligatures off (F14)

OWNS

the mono font setup under crates/ui-egui/src/design/ (fonts.rs was deleted in the working tree: confirm which file defines crate::fonts::* now; owner check first).

GOAL

No calt/liga shaping for code; !=, ->, >=, =>, <!-- show their ASCII characters.

TESTS / VERIFY

snapshot mv/i.md-style note and Bases/Bases syntax.md.

DO NOT

Change the UI (proportional) font.

B9 TASK math: multi-line $$ blocks, \,, \frac12 (F10) and nested callouts (F12)

Math part belongs with the agent now editing crates/math (retest first, it may already be fixed). Nested callouts: crates/markdown/src/scanning/scan.rs callout() at quote depth > 1 plus a recursive card in note_view/blocks.rs:103.

Not fixed anywhere yet and low value

F13 bare URL auto-link and %20 decoding (crates/markdown/src/links.rs + link resolver), F19 (footnote numbering, Unicode tags in markdown tag scanner, stray glyph before #1984).