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

Feature Request: Expand the list of supported scopes #642

Open
1 task done
aireilly opened this issue Jun 9, 2023 · 1 comment
Open
1 task done

Feature Request: Expand the list of supported scopes #642

aireilly opened this issue Jun 9, 2023 · 1 comment

Comments

@aireilly
Copy link

aireilly commented Jun 9, 2023

Check for existing issues

  • Completed

Describe the feature

Vale currently supports the following markup scopes: https://vale.sh/docs/topics/scoping/#markup

In AsciiDoc, the following syntax:

.Recommended SR-IOV configuration

... produces this HTML:

<div class="title">Recommended SR-IOV configuration</div>

It would be really useful to be able to handle this title class in the same way that we can handle h1...h6 elements. So for example, be able to do something like this in a rule:

scope:
  - heading.h1
  - heading.h2
  - title

Maybe a more generalized class.<whatever> scope would be useful in other contexts?

@nrdlngr
Copy link

nrdlngr commented Nov 28, 2023

I have the same issue in reStructuredText. rst2html converts both our page titles and 1st-level headings to <h1 class="title"> and <h1> elements (respectively), so I can't seem to treat them differently because Vale sees both of them as H1s.

Our team uses title case for page titles, and sentence case for other section headings, and right now I don't think there is a way for me to enforce that combination with style rules because Vale doesn't differentiate my page titles from H1 headings.

However, if I could scope to heading.h1.title or something like that, then I could treat these two levels differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants