Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/Doc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Doc = () => {
safeMode: searchParams.has('safeMode'),
};

const Content = mdx.run(String(mdx.react(doc, opts)));
const Content = mdx.run(String(mdx.compile(doc, opts)));

return (
<React.Fragment>
Expand Down
2 changes: 1 addition & 1 deletion index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const reactProcessor = (opts = {}) => {
return createProcessor({ remarkPlugins: [calloutTransformer], ...opts });
};

export const react = (text: string, opts = {}) => {
export const compile = (text: string, opts = {}) => {
try {
const code = compileSync(text, {
outputFormat: 'function-body',
Expand Down