start nested markdown patch
This commit is contained in:
parent
001966ac29
commit
099a7a601e
2 changed files with 7 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ import FilenameLink from "./FilenameLink";
|
|||
import StepContainerPreToolbar from "./StepContainerPreToolbar";
|
||||
import { SyntaxHighlightedPre } from "./SyntaxHighlightedPre";
|
||||
import StepContainerPreActionButtons from "./StepContainerPreActionButtons";
|
||||
import { patchNestedMarkdown } from "./utils/patchNestedMarkdown";
|
||||
|
||||
const StyledMarkdown = styled.div<{
|
||||
fontSize?: number;
|
||||
|
|
@ -253,7 +254,7 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview(
|
|||
});
|
||||
|
||||
useEffect(() => {
|
||||
setMarkdownSource(props.source || "");
|
||||
setMarkdownSource(patchNestedMarkdown(props.source ?? ""));
|
||||
}, [props.source]);
|
||||
|
||||
return (
|
||||
|
|
|
|||
5
gui/src/components/markdown/utils/patchNestedMarkdown.ts
Normal file
5
gui/src/components/markdown/utils/patchNestedMarkdown.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export const patchNestedMarkdown = (source: string): string => {
|
||||
const firstCode = source.indexOf("```");
|
||||
|
||||
return source;
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue