Skip to content

Commit

Permalink
feat: Add rule against punctuations at the end of headings
Browse files Browse the repository at this point in the history
In document titles and headings, use sentence case. That is, capitalize only
the first word in the title, the first word in a subheading after a colon, and
any proper nouns or other terms that are always capitalized a certain way.

Even though you're using sentence case, don't put a period at the end of a
title or heading.
  • Loading branch information
nhhagen committed May 30, 2024
1 parent f101d25 commit 3f4c3d0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Coop/styles/Coop/HeadingPunctuation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends: existence
message: "Don't put a period at the end of a heading."
nonword: true
level: error
scope: heading
action:
name: edit
params:
- trim_right
- "."
tokens:
- '[a-z0-9][.]\s*$'

0 comments on commit 3f4c3d0

Please sign in to comment.