Skip to content

Commit dfcd7f6

Browse files
committed
OpenShiftAsciiDoc - no alphanumeric charaters in headings
1 parent 79d5042 commit dfcd7f6

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
; Vale configuration file to test the `HardWrappedLines` rule
2+
StylesPath = ../../../styles
3+
MinAlertLevel = error
4+
[*.adoc]
5+
OpenShiftAsciiDoc.HeadingsAlphanumeric = YES
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//vale-fixture
2+
= Don't Use: Special Characters in Headings
3+
4+
//vale-fixture
5+
== No @Symbols! Here
6+
7+
//vale-fixture
8+
== No periods.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//vale-fixture
2+
= Valid Headings with Alphanumeric Characters Only
3+
4+
//vale-fixture
5+
== Exceptions include attribute references like {product-name}
6+
7+
== Also allow single quotes even though we don't like them
8+
9+
== And `backticks` are allowed too even though I cannot remember if we allow them in the style guide
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
extends: existence
3+
scope: raw
4+
level: error
5+
link: https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc#anchoring-in-module-files
6+
message: "Headings should only contain alphanumeric characters."
7+
nonword: true
8+
tokens:
9+
- "^=+\\s+.*[^a-zA-Z0-9\\s\\{\\}'`-].*$"

0 commit comments

Comments
 (0)