vale icon indicating copy to clipboard operation
vale copied to clipboard

Feature Request: Expand the list of supported scopes

Open aireilly opened this issue 2 years ago • 1 comments

Check for existing issues

  • [X] 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?

aireilly avatar Jun 09 '23 08:06 aireilly

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.

nrdlngr avatar Nov 28 '23 19:11 nrdlngr