Replace custom markdown formatting with marked#4
Replace custom markdown formatting with marked#4JesseWilliamson wants to merge 2 commits intomasterfrom
Conversation
|
@codex review please |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6952349f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| */ | ||
| async function mdLines2HtmlBlock(lines: string[]): Promise<string> { | ||
| const multiLineStr = lines.join("\n"); | ||
| return marked.parse(multiLineStr); |
There was a problem hiding this comment.
Restore inline math delimiter conversion
This change routes flashcard bodies directly through marked.parse, but removes the previous $...$/$$...$$ conversion path (consumeInlineMath + MathJax delimiter replacement), so bodies that were authored with dollar-delimited LaTeX now sync as literal dollar text instead of the normalized delimiters the plugin used before. That is a user-visible regression for existing notes relying on the advertised inline math support, because the conversion step no longer runs anywhere in parseDocument/mdLines2HtmlBlock.
Useful? React with 👍 / 👎.
| */ | ||
| async function mdLines2HtmlBlock(lines: string[]): Promise<string> { | ||
| const multiLineStr = lines.join("\n"); | ||
| return marked.parse(multiLineStr); |
There was a problem hiding this comment.
Preserve hard line breaks in rendered card bodies
The old renderer explicitly enabled soft-break handling via remark-breaks, but marked.parse is now called with defaults (where breaks is false), so two quoted lines like > line 1 and > line 2 are rendered as one wrapped paragraph instead of preserving a visual line break. This changes card content formatting for existing notes and will cause unnecessary field churn on sync.
Useful? React with 👍 / 👎.
resolves ANK-14