Skip to content

Commit

Permalink
chore: order of serialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
mint-dewit committed Mar 4, 2024
1 parent 889b889 commit 65b7753
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/apps/client/src/lib/prosemirrorDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,32 +119,32 @@ function prosemirrorNodeToMarkdown(node: ProsemirrorNode): MdAstNode {
value: node.text ?? '',
}

if (node.marks.find((mark) => mark.type === schema.marks.bold)) {
if (node.marks.find((mark) => mark.type === schema.marks.hidden)) {
textNode = {
type: 'strong',
type: 'hidden',
children: [textNode],
code: '**',
code: '$',
}
}
if (node.marks.find((mark) => mark.type === schema.marks.italic)) {
if (node.marks.find((mark) => mark.type === schema.marks.underline)) {
textNode = {
type: 'emphasis',
type: 'underline',
children: [textNode],
code: '_',
code: '||',
}
}
if (node.marks.find((mark) => mark.type === schema.marks.underline)) {
if (node.marks.find((mark) => mark.type === schema.marks.bold)) {
textNode = {
type: 'underline',
type: 'strong',
children: [textNode],
code: '||',
code: '**',
}
}
if (node.marks.find((mark) => mark.type === schema.marks.hidden)) {
if (node.marks.find((mark) => mark.type === schema.marks.italic)) {
textNode = {
type: 'hidden',
type: 'emphasis',
children: [textNode],
code: '$',
code: '_',
}
}
if (node.marks.find((mark) => mark.type === schema.marks.reverse)) {
Expand Down

0 comments on commit 65b7753

Please sign in to comment.