Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert paragraph content to markdown #506

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

gurkerl83
Copy link

  • Introduce isMarkdownEnabled helper function to detect whether an MDX element sets markdownEnabled (either via shorthand or boolean expression).
  • Convert paragraph content to Markdown if markdownEnabled is set, accumulating the result in a new node.markdown field.
  • Use toMarkdown from mdast-util-to-markdown to transform AST nodes to Markdown.

- Introduce `isMarkdownEnabled` helper function to detect whether an MDX element sets `markdownEnabled` (either via shorthand or boolean expression).
- Convert paragraph content to Markdown if `markdownEnabled` is set, accumulating the result in a new `node.markdown` field.
- Use `toMarkdown` from `mdast-util-to-markdown` to transform AST nodes to Markdown.
Copy link

vercel bot commented Mar 31, 2025

@gurkerl83 is attempting to deploy a commit to the codehike Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

No changeset detected. If you are changing codehike click here to add a changeset.

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