diff --git a/.vale/styles/AsciiDoc/MatchingDotCallouts.yml b/.vale/styles/AsciiDoc/MatchingDotCallouts.yml index 014c835..9f00f08 100644 --- a/.vale/styles/AsciiDoc/MatchingDotCallouts.yml +++ b/.vale/styles/AsciiDoc/MatchingDotCallouts.yml @@ -10,7 +10,7 @@ script: | num_codeblock_callouts := 0 num_callouts := 0 - codeblock_callout_regex := ".+<(\\.)>" + codeblock_callout_regex := ".*<(\\.)>" callout_regex := "^<(\\.)>" for line in text.split(scope, "\n") { @@ -37,4 +37,4 @@ script: | num_codeblock_callouts = 0 } } - } \ No newline at end of file + } diff --git a/.vale/styles/AsciiDoc/MatchingNumberedCallouts.yml b/.vale/styles/AsciiDoc/MatchingNumberedCallouts.yml index a918ad3..61200e1 100644 --- a/.vale/styles/AsciiDoc/MatchingNumberedCallouts.yml +++ b/.vale/styles/AsciiDoc/MatchingNumberedCallouts.yml @@ -10,7 +10,7 @@ script: | num_codeblock_callouts := 0 num_callouts := 0 - codeblock_callout_regex := ".+( <\\d+>)+" + codeblock_callout_regex := ".*( <\\d+>)+" callout_regex := "^<(\\d+)>" for line in text.split(scope, "\n") { @@ -37,4 +37,4 @@ script: | num_codeblock_callouts = 0 } } - } \ No newline at end of file + } diff --git a/.vale/styles/AsciiDoc/SequentialNumberedCallouts.yml b/.vale/styles/AsciiDoc/SequentialNumberedCallouts.yml index f59a208..6ae5be4 100644 --- a/.vale/styles/AsciiDoc/SequentialNumberedCallouts.yml +++ b/.vale/styles/AsciiDoc/SequentialNumberedCallouts.yml @@ -9,11 +9,11 @@ script: | matches := [] prev_num := 0 - numbered_callout_regex := "<(\\d+)>" - listingblock_delim_regex := "^-{4,}$" + numbered_callout_regex := ".*<(\\d+)>" + listingblock_delim_regex := "^-{3,}$" for line in text.split(scope, "\n") { - //reset count if we hit a listing block delimiter + //reset count if we hit a listing block delimiter if text.re_match(listingblock_delim_regex, line) { prev_num = 0 } @@ -30,9 +30,9 @@ script: | //start counting if num != prev_num+1 { start := text.index(scope, line) - matches = append(matches, {begin: start, end: start + len(line)}) + matches = append(matches, {begin: start, end: start + len(line)}) } prev_num = num } } - } \ No newline at end of file + } diff --git a/.vale/styles/AsciiDoc/ValidAdmonitionBlocks.yml b/.vale/styles/AsciiDoc/ValidAdmonitionBlocks.yml index 8f9905d..1b43f7d 100644 --- a/.vale/styles/AsciiDoc/ValidAdmonitionBlocks.yml +++ b/.vale/styles/AsciiDoc/ValidAdmonitionBlocks.yml @@ -15,9 +15,9 @@ script: | if text.re_match(admon_delim_regex, line) { count += 1 start := text.index(scope, line) - matches = append(matches, {begin: start, end: start + len(line)}) + matches = append(matches, {begin: start, end: start + len(line)}) } else if count > 1 { count = 0 // admonition block is closed, reset the count matches = [] } - } \ No newline at end of file + } diff --git a/.vale/styles/AsciiDoc/ValidCodeBlocks.yml b/.vale/styles/AsciiDoc/ValidCodeBlocks.yml index 44febd5..7608d2b 100644 --- a/.vale/styles/AsciiDoc/ValidCodeBlocks.yml +++ b/.vale/styles/AsciiDoc/ValidCodeBlocks.yml @@ -7,15 +7,15 @@ scope: raw script: | text := import("text") matches := [] - listingblock_delim_regex := "^-{4,}$" + listingblock_delim_regex := "^-{3,}$" count := 0 for line in text.split(scope, "\n") { if text.re_match(listingblock_delim_regex, line) { count += 1 start := text.index(scope, line) - matches = append(matches, {begin: start, end: start + len(line)}) + matches = append(matches, {begin: start, end: start + len(line)}) } else if count > 1 { count = 0 // listing block is closed, reset the count matches = [] } - } \ No newline at end of file + } diff --git a/.vale/styles/AsciiDoc/ValidConditions.yml b/.vale/styles/AsciiDoc/ValidConditions.yml index 801bd92..54a25dc 100644 --- a/.vale/styles/AsciiDoc/ValidConditions.yml +++ b/.vale/styles/AsciiDoc/ValidConditions.yml @@ -6,7 +6,7 @@ link: https://docs.asciidoctor.org/asciidoc/latest/directives/ifdef-ifndef/ scope: raw script: | text := import("text") - + matches := [] if_regex := "^(ifdef::.+\\[\\]|ifndef::.+\\[\\]|ifeval::.*)"