Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
adding div transformer & deleting old code
  • Loading branch information
jennspencer committed Jul 5, 2024
commit 168ab76fa38efcae7bd85852728fce0878f50a1a
2 changes: 2 additions & 0 deletions lib/mdx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import remarkStringify from 'remark-stringify';

import compilers from '../processor/compile';
import readmeToMdx from '../processor/transform/readme-to-mdx';
import divTransformer from '../processor/transform';

export const mdx = (tree: any, { hast = false } = {}) => {
const processor = unified()
.use(hast ? rehypeRemark : undefined)
.use(remarkMdx)
.use(remarkGfm)
.use(divTransformer)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'm not 100% on this placement, whether or not it should be before the hastifying

Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine, I don't think there's any hastifing in this function. It's taking either an mdast or a hast and outputting mdx.

.use(readmeToMdx)
.use(remarkStringify)
.use(compilers);
Expand Down
10 changes: 0 additions & 10 deletions processor/compile/break.js

This file was deleted.

14 changes: 0 additions & 14 deletions processor/compile/div.js

This file was deleted.

8 changes: 0 additions & 8 deletions processor/compile/escape.js

This file was deleted.

40 changes: 0 additions & 40 deletions processor/compile/figure.js

This file was deleted.

6 changes: 0 additions & 6 deletions processor/compile/glossary.js

This file was deleted.

8 changes: 0 additions & 8 deletions processor/compile/i.js

This file was deleted.

7 changes: 0 additions & 7 deletions processor/compile/magic-block.js

This file was deleted.

8 changes: 0 additions & 8 deletions processor/compile/pin.js

This file was deleted.

11 changes: 0 additions & 11 deletions processor/compile/reusable-content.js

This file was deleted.

7 changes: 0 additions & 7 deletions processor/compile/table-head.js

This file was deleted.

6 changes: 0 additions & 6 deletions processor/compile/var.js

This file was deleted.

34 changes: 0 additions & 34 deletions processor/parse/compact-headings.js

This file was deleted.

46 changes: 0 additions & 46 deletions processor/parse/escape.js

This file was deleted.

Loading