Skip to content

Commit

Permalink
feat: Ignore tokens when they are in links or ref-links.
Browse files Browse the repository at this point in the history
This will allow e.g. [#team-idp](https://link.com) and [#team-idp][slack-link]
  • Loading branch information
bendiknesbo committed Dec 20, 2023
1 parent ccc711c commit 0c2475a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Coop/.vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ StylesPath = styles
Vocab = CoopGeneral, CoopTech, CoopCompanies, CoopAbbreviations, CoopPeople, CoopSystems, CoopLocations, CoopTerms

[*.md]
TokenIgnores = [\w][\w.]*@[\w*][\w.]*[\w], <https://.+>, {{\sread_.+\(.+\)\s}}
TokenIgnores = [\w][\w.]*@[\w*][\w.]*[\w], <https://.+>, {{\sread_.+\(.+\)\s}}, \[.+\]\(.+\), \[.+\]\[.+\]
BasedOnStyles = Vale
24 changes: 24 additions & 0 deletions docs/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Testing of vale

The following examples should all pass Techdocs-validation, even though `IDP`
should normally be capitalized:

Example using IDP capitalized.

Example using [#team-idp](https://www.coop.no/) lowercase in a link.

Example using [#team-idp][idp-ref-link] lowercase in a ref-link.

Example using <https://idp> lowercase in a angle-bracket link.

Example using `idp` lowercase in an inline block.

```go
Example using idp in a code block.
```

<!-- vale off -->
Example using lowercase idp in vale-disabled block.
<!-- vale on -->

[idp-ref-link]: https://www.coop.no/

0 comments on commit 0c2475a

Please sign in to comment.