executablebooks / myst-vs-code

A syntax highlighter for the MyST Markdown format
https://marketplace.visualstudio.com/items?itemName=ExecutableBookProject.myst-highlight
MIT License
35 stars 15 forks source link

✨ NEW: Use external markdown-it plugins #30

Closed chrisjsewell closed 2 years ago

chrisjsewell commented 3 years ago

Replaced the (very adhoc) local markdown-it plugin for directives, with https://github.com/executablebooks/markdown-it-docutils, and in general it works πŸŽ‰ ! (some notes and todos below)

image

TODOS:

@rowanc1 it would be great if you give this a try (the dev instructions are in the README); it would be good for you to understand this use case for the markdown-it plugins, and maybe even get some idea for curvenote πŸ˜„

also cc @pradyunsg (as mentioned I borrowed some of your sass from Furo πŸ˜„)

rowanc1 commented 3 years ago

Just seeing this in the css -- https://caniuse.com/css-masks is not in chrome/webkit which this uses.

Mine currently look like this in Chrome here: https://executablebooks.github.io/markdown-it-docutils/: image

(changed the mask property on the second one...)

chrisjsewell commented 3 years ago

Ah cheers, that could be it then πŸ‘

chrisjsewell commented 3 years ago

Ah so furo uses https://github.com/postcss/autoprefixer (via gulp) during the css compliation, which auto-adds vendor prefixes (which is why I did not find e.g. -webkit-mask-image in the actual sass)

chrisjsewell commented 3 years ago

After update to markdown-it-docutils v0.0.10:

image