rc markdown: Fix code fence regex
The invalid regex `)\b` currently matches anything, so this didn't cause any errors. It is still invalid though, so I fixed it by moving the `\b` to the end of the non-raw_attribute language name (like the original regex). The raw_attribute one shouldn't need this because the `}` marks the end of the language name anyway. Fixes #4025
This commit is contained in:
parent
e84dd80244
commit
3397737b16
|
@ -48,7 +48,7 @@ evaluate-commands %sh{
|
|||
ruby rust sass scala scss sh swift toml tupfile typescript yaml sql
|
||||
"
|
||||
for lang in ${languages}; do
|
||||
printf 'add-highlighter shared/markdown/%s region -match-capture ^(\h*)```\h*(%s|\\{[.=]?%s\\}))\\b ^(\h*)``` regions\n' "${lang}" "${lang}" "${lang}"
|
||||
printf 'add-highlighter shared/markdown/%s region -match-capture ^(\h*)```\h*(%s\\b|\\{[.=]?%s\\}) ^(\h*)``` regions\n' "${lang}" "${lang}" "${lang}"
|
||||
printf 'add-highlighter shared/markdown/%s/ default-region fill meta\n' "${lang}"
|
||||
[ "${lang}" = kak ] && ref=kakrc || ref="${lang}"
|
||||
printf 'add-highlighter shared/markdown/%s/inner region \A```[^\\n]*\K (?=```) ref %s\n' "${lang}" "${ref}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user