Skip to content
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

YAML frontmatter hyphens in markdown files are incorrectly scoped/have no scope applied #170032

Closed
Tracked by #1
Fantazstic opened this issue Dec 26, 2022 · 2 comments
Closed
Tracked by #1
Assignees
Labels
*extension-candidate Issue identified as good extension implementation

Comments

@Fantazstic
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.74.2
  • OS Version: Windows 10 Pro 64bit 20H2

Steps to Reproduce:

  1. Create feature_request.md:
---
name: Feature request
about: Suggest an idea for this project
title: "[REQUEST]"
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
  1. Use "Developer: Inspect Editor Tokens and Scopes"
  2. Select the frontmatter hyphens ---
  3. Notice empty scope/no scope applied
  4. So, we can't edit the colors (cannot use text.html.markdown since that will select all the normal text too)

Code_bc3iS5RDoU

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 3, 2023

YAML front matter is not a standard markdown concept. For core VS Code, we target standard common mark but support for additional features can be contributed by extensions

@mjbvz mjbvz closed this as completed Jan 3, 2023
@mjbvz mjbvz added the *extension-candidate Issue identified as good extension implementation label Jan 3, 2023
@Fantazstic
Copy link
Author

@mjbvz Thanks for the reply.

It looks like VSCode can recognize horizontal rule common markdown, but only further down in the file.

AFAIK other editors, for example Atom, have consistent syntax highlighting, while VSCode is being inconsistent with them.

Screenshots:

VSCode Atom
Code_L2ILmbiOVR atom_q0BmBXTLKY

Could we get support for the untokenized separators to be tokenized as meta.separator.markdown as well?

@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*extension-candidate Issue identified as good extension implementation
Projects
None yet
Development

No branches or pull requests

2 participants