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 55065d5 commit 273f056Copy full SHA for 273f056
src/Slides/index.tsx
@@ -40,6 +40,10 @@ export function Slides(props: { initValue: string }) {
40
>
41
<div className="slides">
42
{props.initValue?.split('\n##').map((line, index) => {
43
+ let content = line;
44
+ if (!line?.startsWith('#') && index !== 0) {
45
+ content = `##` + content;
46
+ }
47
return (
48
<section key={index}>
49
<MarkdownEditor
@@ -54,7 +58,7 @@ export function Slides(props: { initValue: string }) {
54
58
height: '100%',
55
59
overflow: 'hidden',
56
60
}}
57
- initValue={line?.startsWith('#') ? line : `##` + line}
61
+ initValue={content}
62
/>
63
</section>
64
);
0 commit comments