deno-gfm
deno-gfm copied to clipboard
fix: yaml is correctly highlighted
closes https://github.com/denoland/deno-gfm/issues/60
Sadly prism doesn't offer an easy way to import languages, so I've just hacked it in by doing:
import "https://esm.sh/[email protected]/components/prism-yaml";
The testing strategy I was pursuing needed a major refactor, which I've done here. It's now significantly easier to add server cases. Additionally, you can now easily visually inspect the test cases by running deno task server
. This currently produces the following output:
# Deno GFM Server Tests
[basicMarkdownTable](http://localhost:8000/basicMarkdownTable)
[yaml](http://localhost:8000/yaml)
I think the highlighting on the yaml case can be improved. Please let me know what I should be doing in main.scss
to improve this.
Waiting on https://github.com/denoland/deno-gfm/pull/99, so that this PR is focused purely on YAML, instead of also redoing the testing infrastructure.
@hashrock and @crowlKats, what do you think about this one? On the positive side, it highlights yaml better than we currently do. On the negative side, it might not be right in all cases and if the user doesn't want yaml highlighting, there's no way to opt out. I'd say the positives outweigh the negatives though.
@deer I agree positives outweigh the negatives. It would be a positive addition to the package if added, also contributes to the goal of it all working out the box.