We have a little syntax highlighting problem with a few YAML keys.
You can see GitHub.com (Ruby) handling it a little better:
# Ignore all `.env` files in any location.
# This could also have been written on a single line as:
#
# "*": ["**/.env"]
"*":
- "**/.env"
# In the `octo-repo` repository in this organization:
octo-repo:
# Ignore the `/src/kernel.rs` file.
- "/src/kernel.rs"
# In the `primer/react` repository on {% data variables.product.prodname_dotcom %}:
https://github.com/primer/react.git:
# Ignore any files in or below the `/e2e` directory.
- "/e2e/**"
# In the `copilot` repository of any {% data variables.product.prodname_dotcom %} organization:
git@github.com:*/copilot:
# Ignore any files in or below the `/__tests__` directory.
- "/__tests__/**"
# Ignore any files in the `/script` directory.
- "/script/*"
# In the `gitlab-org/gitlab-runner` repository on GitLab:
git@gitlab.com:gitlab-org/gitlab-runner.git:
# Ignore the `/main_test.go` file.
- "/main_test.go"
# Ignore any files in any `packages` directories, anywhere in this repository.
- "**/packages/*"
# Ignore any files with names beginning `server` or `session`, anywhere in this repository.
- "**/{server,session}*"
# Ignore any files with names ending `.md` or `.mk`, anywhere in this repository.
- "**/*.m[dk]"
Describe the issue
👋 Hello hello from GitHub Docs! We use highlight.js and are very grateful for your maintenance.
https://docs.github.com/en/copilot/managing-github-copilot-in-your-organization/configuring-content-exclusions-for-github-copilot#example-of-repositories-and-paths-in-organization-settings
We have a little syntax highlighting problem with a few YAML keys.
You can see GitHub.com (Ruby) handling it a little better:
I believe the relevant code would be here:
https://github.com/highlightjs/highlight.js/blob/583cb33627474ff577305dc787f9a2a09eaf3b88/src/languages/yaml.js#L16-L30
For our purposes we would need
@
and*
supported, but I believe there's a wider range of supported characters for YAML keys.Which language seems to have the issue?
YAML
Are you using
highlight
orhighlightAuto
?highlight
Sample Code to Reproduce
See description above
Expected behavior
See description Additional context
N/A