Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Copy link
Member

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

Copy link
Collaborator Author

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.

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
9 changes: 9 additions & 0 deletions .vale/styles/OpenShiftAsciiDoc/HeadingsAlphanumeric.yml
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\\{\\}'`-].*$"
Copy link
Member

@aireilly aireilly Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "^=+\\s+.*[^a-zA-Z0-9\\s\\{\\}'`-].*$"
- "^=+\s+.*[^a-zA-Z0-9\s\{\}'`-].*$"

Copy link
Member

@aireilly aireilly Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need to escape here

Copy link
Collaborator Author

@rohennes rohennes Nov 24, 2025

Choose a reason for hiding this comment

The 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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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