Created
July 28, 2020 07:35
-
-
Save BorisAnthony/9b10501ea3d68c8c3a69a93d6f5fdd22 to your computer and use it in GitHub Desktop.
A second attempt at a little Jekyll plugin to parse ==text== into <mark>text</mark>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jekyll::Hooks.register :pages, :pre_render do |page| | |
page.content = page.content.gsub( | |
/\=\=(.*)\=\=/i, | |
'<mark>\1</mark>' | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First attempt here:
https://gist.github.com/BorisAnthony/89a34ae67a84fd21e2717971482c6a9b
Oddly same problem: gsub does its thing, but any markdown contained in between does not get rendered as HTML afterwards (even though we are firing this "pre_render"