Skip to content

Replace custom markdown formatting with marked#4

Open
JesseWilliamson wants to merge 2 commits intomasterfrom
jesse/ank-14-replace-custom-markdown-formatting-with-marked
Open

Replace custom markdown formatting with marked#4
JesseWilliamson wants to merge 2 commits intomasterfrom
jesse/ank-14-replace-custom-markdown-formatting-with-marked

Conversation

@JesseWilliamson
Copy link
Copy Markdown
Owner

resolves ANK-14

@linear
Copy link
Copy Markdown

linear Bot commented Mar 14, 2026

@JesseWilliamson
Copy link
Copy Markdown
Owner Author

@codex review please

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/syncUtil.ts
*/
async function mdLines2HtmlBlock(lines: string[]): Promise<string> {
const multiLineStr = lines.join("\n");
return marked.parse(multiLineStr);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread src/syncUtil.ts
*/
async function mdLines2HtmlBlock(lines: string[]): Promise<string> {
const multiLineStr = lines.join("\n");
return marked.parse(multiLineStr);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant