Skip to content

Commit

Permalink
fix(markdown): Fix wrong font families in code blocks (revery-ui#906)
Browse files Browse the repository at this point in the history
* Fix wrong font families in code blocks

* Add default to rei

* format,

Co-authored-by: Github Runner <runner@runner.github.com>
  • Loading branch information
zbaylin and Github Runner authored Jun 9, 2020
1 parent e88ccc3 commit b77b829
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UI_Components/Markdown.re
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ let generateText = (text, styles, attrs, dispatch, state) => {
<Text
text
fontSize
fontFamily={styles.fontFamily}
fontFamily={styles.codeFontFamily}
fontWeight
style=Style.[
textWrap(TextWrapping.WrapIgnoreWhitespace),
Expand Down Expand Up @@ -445,7 +445,7 @@ and generateCodeBlock =
textWrap(TextWrapping.WrapIgnoreWhitespace),
color(block.color),
]
fontFamily={styles.fontFamily}
fontFamily={styles.codeFontFamily}
fontWeight={block.bold ? Weight.Bold : Weight.Normal}
monospaced=true
fontSize
Expand Down
2 changes: 2 additions & 0 deletions src/UI_Components/Markdown.rei
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module SyntaxHighlight: {
type highlight;
type t = (~language: string, list(string)) => list(list(highlight));

let default: t;

let makeHighlight:
(
~byteIndex: int,
Expand Down

0 comments on commit b77b829

Please sign in to comment.