-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't determine if powershell code-snippets should be supported #2598
Comments
I believe it's a Redoc issue. @AlexVarchuk could you take a look at it? |
Hi @michaelgwelch, thank you for the question. Redoc does not highlight PR is welcome |
@AlexVarchuk @tatomyr thanks for quick responses. Alex, no, powershell is not required; but it is the tool I use most often (using the You can consider this question answered. I just wanted to know if I was doing something wrong and I was getting mixed signals trying to figure it out from the docs. |
Describe the bug
What languages are supported by syntax highlighter for
x-codeSamples
(Or is this a question for redoc repo?)I'm using
x-codeSamples
and the powershell examples are not highlighted correctly.To Reproduce
Steps to reproduce the behavior:
Given no
redocly.yaml
fileand this OpenAPI file
And running this command
I get a html file that doesn't render the powershell snippet correctly.
I notice it immediately with the first line (the comment) because
it highlights the quoted content as a string and the comment isn't set off
in a comment color
Expected behavior
I think (but don't know for sure) that prismjs is the highlighter and it supports powershell.
I expect the syntax highlighting to be rendered appropriately for powershell. (Like if I create a javascript example)
Perhaps redoc only supports a limited subset of prismjs languages? I see here that the required
lang
property is documented but it links to a list of @github/linguist languages.But the list of linguist languages includes PowerShell.
Perhaps there's a way to configure redoc with additional languages?
Redocly Version(s)
1.25.3
Node.js
Version(s)18.20.4
OS, environment
macOS 14.7
The text was updated successfully, but these errors were encountered: