Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

syntax highlighting for markdown-embedded gherkin #26

Open
danieleades opened this issue Dec 3, 2020 · 10 comments · Fixed by #27 · May be fixed by #28
Open

syntax highlighting for markdown-embedded gherkin #26

danieleades opened this issue Dec 3, 2020 · 10 comments · Fixed by #27 · May be fixed by #28

Comments

@danieleades
Copy link
Contributor

I'm using yzhang.markdown-all-in-one for previewing markdown files. This works a treat for automagically applying syntax highlighting to both the plain-text and the generated output.

This plugin seems to have some mechanism for picking up installed syntax highlighters based on the tags on markdown code blocks. I usually find that installing an appropriate plugin Just Works (for python, plantuml, Rust, etc.)

Is there some way to register this plugin as a syntax highlighter for these embedded code blocks?

apologies for not providing more detail, i'm really not clear on how this is implemented for other 'languages'. Hoping you'll know more than me

@danieleades
Copy link
Contributor Author

update: on reboot the syntax highlighting is working in the rendered preview, but no syntax highlighting is present in the plain-text view

@danieleades
Copy link
Contributor Author

found this - microsoft/vscode#23055 (comment)

@dialex
Copy link
Collaborator

dialex commented Dec 3, 2020

Hi there, I'm not sure I understand your expected behaviour. Can you include a couple of screenshots that show what you expected vs what you actually have?

@danieleades
Copy link
Contributor Author

absolutely. here's a screenshot-

Screenshot 2020-12-04 091605

as you can see, I have syntax highlighting in fenced code blocks for just about every language I use, except for features

@dialex
Copy link
Collaborator

dialex commented Dec 5, 2020

Perfect, now it's clear! I would use gherkin instead of feature as the language identifier, because that's the official name of that syntax.

I can't implement that feature right now, but if anyone wants to contribute I'll gladly merge it.

@danieleades
Copy link
Contributor Author

looks like it just requires an update to package.json, though I don't know how to test the change.

@danieleades
Copy link
Contributor Author

And... Does it work?

@dialex
Copy link
Collaborator

dialex commented Dec 12, 2020

Not yet, still trying (committing directly to master, testing in production, cowboy mode: activated 😬)

@dialex dialex reopened this Dec 12, 2020
@dialex dialex linked a pull request Dec 12, 2020 that will close this issue
@dialex
Copy link
Collaborator

dialex commented Dec 12, 2020

It didn't work :( This was my attempt 26380c4

I'll ping https://github.com/mjbvz, maybe he can help spot what's wrong: mjbvz/vscode-fenced-code-block-grammar-injection-example#9

@dialex
Copy link
Collaborator

dialex commented Dec 19, 2020

I followed @mjbvz advice and made this change: 86c9ed3

However it still doesn't work. I'll have to give up. I'll leave the issue and PR opened in case someone else wants to fix it. Sorry :/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants