fix regex

This commit is contained in:
craig-osterhout
2022-11-17 17:07:10 -08:00
parent 9542114e76
commit d1b1aed99d
3 changed files with 6 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ link: https://docs.docker.com/contribute/style/formatting/#best-practice-for-com
level: warning
scope: raw
# check for 1, 2, 4, 6 or more spaces at start of line before code fence (```)
#If not indented by 3 spaces at first level or 5 spaces at second level, then a hidden space is inserted and copied by the copy code feature.
# If not indented by 3 spaces at first level or 5 spaces at second level, then a hidden space is inserted and copied by the copy code feature.
raw:
- '(?m:^[ ]{1}\`\`\`)|'
- '(?m:^[ ]{2}\`\`\`)|'

View File

@@ -8,5 +8,5 @@ raw:
- '(\`\`\`console\n)' # start ```console
- '[^(\$|#)]*' # 0 or more characters without $ or #
- '.*(\$|#).*[^\`\\]\n' # 1 line with $ or #, without ` or \ at end
- '((?!\`\`\`|\$|#)(.|\n))*' # 0 or more lines without ```, $, or #
- '((?!\`\`\`|\$|#)(.|\n))+' # 1 or more lines without ```, $, or #
- '\`\`\`' # stop ```

View File

@@ -6,10 +6,9 @@ scope: raw
#check for console code fence followed by at least two lines with $ or #
raw:
- '\`\`\`console\n' # start at ```console
- '[^(\$|#)]*' # 0 or more characters without $ or #
- '[^(\$|#|\`\`\`)]*' # 0 or more characters without $, #, or ```
- '.*(\$|#).*\n' # 1 line with $ or #
- '[^(\$|#)]*' # 0 or more characters without $ or #
- '[^(\$|#|\`\`\`)]*' # 0 or more characters without $, #, or ```
- '.*(\$|#).*\n' # 1 line with $ or #
- '((?!\`\`\`)(.|\n))*' # 0 or characters without ```
- '\`\`\`' # stop ```
- '[^(\`\`\`)]*' # 0 or more characters without ```
- '\`\`\`' # stop ```