Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/ui/markdown.rs')
-rw-r--r--helix-term/src/ui/markdown.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs
index 96614443..d3fdec02 100644
--- a/helix-term/src/ui/markdown.rs
+++ b/helix-term/src/ui/markdown.rs
@@ -54,7 +54,14 @@ pub fn highlighted_code_block<'a>(
language.into(),
))
.and_then(|config| config.highlight_config(theme.scopes()))
- .and_then(|config| Syntax::new(ropeslice, config, Arc::clone(&config_loader)));
+ .and_then(|config| {
+ Syntax::new(ropeslice, config, |injection| {
+ config_loader
+ .load()
+ .language_configuration_for_injection_string(injection)
+ .and_then(|config| config.get_highlight_config())
+ })
+ });
let syntax = match syntax {
Some(s) => s,