File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ pub struct Markdown {
45
45
pub external_links_no_referrer : bool ,
46
46
/// Whether smart punctuation is enabled (changing quotes, dashes, dots etc in their typographic form)
47
47
pub smart_punctuation : bool ,
48
+ /// Whether to enable latex math rendering
49
+ pub math : bool ,
48
50
/// Whether footnotes are rendered at the bottom in the style of GitHub.
49
51
pub bottom_footnotes : bool ,
50
52
/// A list of directories to search for additional `.sublime-syntax` and `.tmTheme` files in.
@@ -208,6 +210,7 @@ impl Default for Markdown {
208
210
external_links_no_follow : false ,
209
211
external_links_no_referrer : false ,
210
212
smart_punctuation : false ,
213
+ math : false ,
211
214
bottom_footnotes : false ,
212
215
extra_syntaxes_and_themes : vec ! [ ] ,
213
216
extra_syntax_set : None ,
Original file line number Diff line number Diff line change @@ -439,6 +439,9 @@ pub fn markdown_to_html(
439
439
if context. config . markdown . smart_punctuation {
440
440
opts. insert ( Options :: ENABLE_SMART_PUNCTUATION ) ;
441
441
}
442
+ if context. config . markdown . math {
443
+ opts. insert ( Options :: ENABLE_MATH ) ;
444
+ }
442
445
443
446
// we reverse their order so we can pop them easily in order
444
447
let mut html_shortcodes: Vec < _ > = html_shortcodes. into_iter ( ) . rev ( ) . collect ( ) ;
You can’t perform that action at this time.
0 commit comments