Skip to content

Commit

Permalink
fix: underline tags are correctly parsed
Browse files Browse the repository at this point in the history
Fixes #208
  • Loading branch information
petyosi committed Nov 30, 2023
1 parent 918c319 commit 735da40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/examples/assets/live-demo-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is a **live demo** of MDXEditor with all default features on.
[— Daring Fireball](https://daringfireball.net/projects/markdown/).

In here, you can find the following markdown elements:
In here, you <u>can find</u> the following markdown elements:

* Headings
* Lists
Expand Down
2 changes: 1 addition & 1 deletion src/exportMarkdownFromLexical.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function exportLexicalTreeToMdast({
let unistRoot: Mdast.Root | null = null
const referredComponents = new Set<string>()

visitors = visitors.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0))
visitors = visitors.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0))

visit(root, null)

Expand Down
2 changes: 1 addition & 1 deletion src/importMarkdownToLexical.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function importMarkdownToLexical({ root, markdown, visitors, syntaxExtens
export function importMdastTreeToLexical({ root, mdastRoot, visitors }: MdastTreeImportOptions): void {
const formattingMap = new WeakMap<object, number>()

visitors = visitors.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0))
visitors = visitors.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0))

function visitChildren(mdastNode: Mdast.Parent, lexicalParent: LexicalNode) {
if (!isParent(mdastNode)) {
Expand Down

0 comments on commit 735da40

Please sign in to comment.