Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(markdown): Fix wrong font families in code blocks #906

Merged
merged 3 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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