From 580de0be1fc7259bdab64298fa6e9493daa87f90 Mon Sep 17 00:00:00 2001 From: Sune Simonsen Date: Fri, 3 Jan 2020 17:19:44 +0100 Subject: [PATCH] Fix source code highlighting when using marked.js I'm currently experiencing problems getting the source code highlighting to work with https://github.com/markedjs/marked The reason is that Marked outputs the following structure: ```html
const hello = 'world';
``` and the current selector expects the `pre` tag to have a `lang` attribute. This PR splits the forwarding of the `lang` attribute to a class and the code that initialise the highlighting for each block. It will try to initialise the highlighting for every `code` block that is inside a `pre` tag. --- modules/lang/markdown/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index 9639ef093..819bcc3ec 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -40,7 +40,7 @@ capture, the end position, and the output buffer.") (concat "" "" "" - "")) + "")) :config (set-flyspell-predicate! '(markdown-mode gfm-mode)