From 0b3d49e9fa8b634bf421a1350b8e7452b6d625b4 Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Fri, 13 Sep 2024 10:21:56 +0300 Subject: [PATCH] Ignoring Hugo control tokens Signed-off-by: Gergely Csatari --- .vale.ini | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index 95679aba..7d6d7c00 100644 --- a/.vale.ini +++ b/.vale.ini @@ -13,4 +13,15 @@ MinAlertLevel = suggestion Vocab = Nephio [*.md] -BasedOnStyles = Vale, proselint, alex \ No newline at end of file +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 HTML, ... >}}` +BlockIgnores = (?sm)^({{[%<] \w+ [^{]*?\s[%>]}})\n$, \ +(?s) *({{< highlight [^>]* ?>}}.*?{{< ?/ ?highlight >}}) \ No newline at end of file