We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 113860c commit 4fd26bbCopy full SHA for 4fd26bb
packages/lexical-markdown/src/MarkdownExport.ts
@@ -44,13 +44,9 @@ export function createMarkdownExport(
44
// <strong><code>code</code></strong> will be exported as `**Bold Code**`, as the code format will be applied first, and the bold format
45
// will be applied second and thus skipped entirely, as the code format will prevent any further formatting.
46
.sort((a, b) => {
47
- if (a.format.includes('code') && !b.format.includes('code')) {
48
- return 1;
49
- } else if (!a.format.includes('code') && b.format.includes('code')) {
50
- return -1;
51
- } else {
52
- return 0;
53
- }
+ return (
+ Number(a.format.includes('code')) - Number(b.format.includes('code'))
+ );
54
});
55
56
return (node) => {
0 commit comments