Skip to content

Commit

Permalink
fix: escape raw html in message, fix #44, #43
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiu8081 committed May 25, 2023
1 parent 0e6efe7 commit 737ed7c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const parseMarkdown = (raw: string) => {
.use(remarkParse)
.use(remarkGfm)
.use(remarkMath)
.use(remarkRehype)
.use(remarkRehype, { allowDangerousHtml: true })
.use(rehypePrism, {
ignoreMissing: true,
})
Expand Down
2 changes: 1 addition & 1 deletion src/components/StreamableText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default (props: Props) => {

return (
<Markdown
class={`prose prose-neutral dark:prose-invert fg-base! max-w-3xl -my-4 ${props.class ?? ''}`}
class={`prose prose-neutral dark:prose-invert fg-base! max-w-3xl ${props.class ?? ''}`}
text={localText()}
showRawCode={props.showRawCode}
/>
Expand Down
6 changes: 6 additions & 0 deletions unocss.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ export default defineConfig({
presetIcons(),
presetTypography({
cssExtend: {
'*:first-child': {
'margin-top': 0,
},
'*:last-child': {
'margin-bottom': 0,
},
'h1': {
'font-size': '1.25em',
'margin': '1rem 0',
Expand Down

0 comments on commit 737ed7c

Please sign in to comment.