Skip to content

Commit 183b0dc

Browse files
committed
vale: improve ignores for hugo markup
Shortcode tags spanning over multiple lines were not being ignored Signed-off-by: David Karlsson <[email protected]>
1 parent ae74c20 commit 183b0dc

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.vale.ini

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ MinAlertLevel = suggestion
33

44
Vocab = Docker
55

6-
Packages = Hugo
7-
86
[*.md]
97
BasedOnStyles = Vale, Docker
8+
# Exclude `{{< ... >}}`, `{{% ... %}}`, [Who]({{< ... >}})
9+
TokenIgnores = ({{[%<] .* [%>]}}.*?{{[%<] ?/.* [%>]}}), \
10+
(\[.+\]\({{< .+ >}}\)), \
11+
[^\S\r\n]({{[%<] \w+ .+ [%>]}})\s, \
12+
[^\S\r\n]({{[%<](?:/\*) .* (?:\*/)[%>]}})\s, \
13+
(?sm)({{[%<] .*?\s[%>]}})
14+
15+
# Exclude `{{< myshortcode `This is some <b>HTML</b>, ... >}}`
16+
BlockIgnores = (?sm)^({{[%<] \w+ [^{]*?\s[%>]}})\n$, \
17+
(?s) *({{< highlight [^>]* ?>}}.*?{{< ?/ ?highlight >}})

0 commit comments

Comments
 (0)