Skip to content

Commit

Permalink
fix: add paddingRight for blockquote
Browse files Browse the repository at this point in the history
to avoid cursor overlapping in inline-block
  • Loading branch information
dominictb committed Jun 4, 2024
1 parent 5829323 commit 19717d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/hooks/useMarkdownStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ function useMarkdownStyle(message: string | null = null): MarkdownStyle {
borderWidth: 4,
marginLeft: 0,
paddingLeft: 6,
/**
* since blockquote has `inline-block` display -> padding-right is needed to prevent cursor overlapping
* with last character of the text node.
* As long as paddingRight > cursor.width, cursor will be displayed correctly.
*/
paddingRight: 1,
},
code: {
fontFamily: FontUtils.fontFamily.platform.MONOSPACE,
Expand Down

0 comments on commit 19717d9

Please sign in to comment.