Skip to content

Commit 99da30d

Browse files
committed
Update the regular expressions to include optional comment syntax
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
1 parent cfa41c3 commit 99da30d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

testdata/shortcodes/.vale.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
BasedOnStyles = Vale
33

44
# Exclude `{{< ... >}}`, `{{% ... %}}`, [Who]({{< ... >}})
5-
TokenIgnores = ({{[%<] .* [%>]}}.*?{{[%<] ?/.* [%>]}}), \
6-
(\[.+\]\({{< .+ >}}\)), \
7-
({{[%<] .+ [%>]}})
5+
TokenIgnores = ({{[%<](?:/\*)? .* (?:\*/)?[%>]}}.*?{{[%<](?:/\*| )?/.* (?:\*/)?[%>]}}), \
6+
(\[.+\]\({{<(?:/\*)? .+ (?:\*/)?>}}\)), \
7+
({{[%<](?:/\*)? .+ (?:\*/)?[%>]}})
88

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

0 commit comments

Comments
 (0)