-
Notifications
You must be signed in to change notification settings - Fork 64
OpenShiftAsciiDoc - no alphanumeric charaters in headings #987
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ; Vale configuration file to test the `HardWrappedLines` rule | ||
| StylesPath = ../../../styles | ||
| MinAlertLevel = error | ||
| [*.adoc] | ||
| OpenShiftAsciiDoc.HeadingsAlphanumeric = YES |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| //vale-fixture | ||
| = Don't Use: Special Characters in Headings | ||
|
|
||
| //vale-fixture | ||
| == No @Symbols! Here | ||
|
|
||
| //vale-fixture | ||
| == No periods. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| //vale-fixture | ||
| = Valid Headings with Alphanumeric Characters Only | ||
|
|
||
| //vale-fixture | ||
| == Exceptions include attribute references like {product-name} | ||
|
|
||
| == Also allow single quotes even though we don't like them | ||
|
|
||
| == And `backticks` are allowed too even though I cannot remember if we allow them in the style guide |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,9 @@ | ||||||
| --- | ||||||
| extends: existence | ||||||
| scope: raw | ||||||
| level: error | ||||||
| link: https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc#anchoring-in-module-files | ||||||
| message: "Headings should only contain alphanumeric characters." | ||||||
| nonword: true | ||||||
| tokens: | ||||||
| - "^=+\\s+.*[^a-zA-Z0-9\\s\\{\\}'`-].*$" | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need to escape here
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Scrapped this version and moving to a tengo script. It was flagging on admonition blocks
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. btw, I recall that whatever flavour of regex Value uses required double escapes to work |
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but Something like this is valid and gets caught too:
== Installing the .NET plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... bit of a clash there I guess. Maybe need an exclusion list. Apparently periods in headings break something in PV1.