Merge pull request #5754 from Pragadesh-45/fix/doc-editor

feat(Markdown): override normalizing on whitespace in markdown editor
This commit is contained in:
Anoop M D
2025-10-11 17:25:39 +05:30
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -78,6 +78,14 @@ const StyledMarkdownBodyWrapper = styled.div`
background-color: ${(props) => props.theme.bg};
}
}
p {
white-space: pre-wrap;
}
div {
white-space: pre-wrap;
}
}
`;

View File

@@ -6,6 +6,9 @@ import { isValidUrl } from 'utils/url/index';
const Markdown = ({ collectionPath, onDoubleClick, content }) => {
const markdownItOptions = {
html: true,
breaks: true,
linkify: true,
replaceLink: function (link, env) {
return link.replace(/^\./, collectionPath);
}