Skip to content

Commit

Permalink
Ignoring Hugo control tokens
Browse files Browse the repository at this point in the history
Signed-off-by: Gergely Csatari <[email protected]>
  • Loading branch information
CsatariGergely committed Sep 13, 2024
1 parent 12ff4b7 commit 0b3d49e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,15 @@ MinAlertLevel = suggestion
Vocab = Nephio

[*.md]
BasedOnStyles = Vale, proselint, alex
BasedOnStyles = Vale, proselint, alex

# based on https://github.com/errata-ai/Hugo/blob/main/Hugo/.vale.ini
# Exclude `{{< ... >}}`, `{{% ... %}}`, [Who]({{< ... >}})
TokenIgnores = ({{[%<] .* [%>]}}.*?{{[%<] ?/.* [%>]}}), \
(\[.+\]\({{< .+ >}}\)), \
[^\S\r\n]({{[%<] \w+ .+ [%>]}})\s, \
[^\S\r\n]({{[%<](?:/\*) .* (?:\*/)[%>]}})\s

# Exclude `{{< myshortcode `This is some <b>HTML</b>, ... >}}`
BlockIgnores = (?sm)^({{[%<] \w+ [^{]*?\s[%>]}})\n$, \
(?s) *({{< highlight [^>]* ?>}}.*?{{< ?/ ?highlight >}})

0 comments on commit 0b3d49e

Please sign in to comment.