Skip to content

Instantly share code, notes, and snippets.

@BorisAnthony
Created July 28, 2020 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BorisAnthony/9b10501ea3d68c8c3a69a93d6f5fdd22 to your computer and use it in GitHub Desktop.
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>
Jekyll::Hooks.register :pages, :pre_render do |page|
page.content = page.content.gsub(
/\=\=(.*)\=\=/i,
'<mark>\1</mark>'
)
end
@BorisAnthony
Copy link
Author

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment