mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-16 04:11:29 +00:00
feat(Markdown): enhance Markdown rendering options and use exact whitespace instead normalizing
This commit is contained in:
@@ -78,6 +78,14 @@ const StyledMarkdownBodyWrapper = styled.div`
|
||||
background-color: ${(props) => props.theme.bg};
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
div {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user