Skip to content

Commit

Permalink
optimize exported Markdown style, add H2 to author
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoukuncheng committed Mar 30, 2024
1 parent 1e6359b commit e233d57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/Share/MarkdownView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ const MarkdownView: FC<Props> = ({ messages }) => {
const content = useMemo(() => {
return messages
.filter((m) => !!m.text)
.map((m) => `**${m.author}**: ` + m.text)
.map((m) => `## ${m.author}` + '\n\n' + m.text)
.join('\n\n')
}, [messages])


const copy = useCallback(() => {
navigator.clipboard.writeText(content)
setCopied(true)
Expand Down

0 comments on commit e233d57

Please sign in to comment.