deno-gfm icon indicating copy to clipboard operation
deno-gfm copied to clipboard

fix: yaml is correctly highlighted

Open deer opened this issue 1 year ago • 2 comments

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.

deer avatar Jan 23 '24 07:01 deer

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.

deer avatar Jan 29 '24 11:01 deer

@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 avatar Feb 01 '24 16:02 deer

@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.

Mrashes avatar Jul 02 '24 02:07 Mrashes