language_md: don't require space at end on '_', '__', '___' (#1129)

This commit is contained in:
Jefferson González 2022-09-28 22:44:42 -04:00 committed by GitHub
parent e0e928c31e
commit a0164d5902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -42,9 +42,9 @@ syntax.add {
-- blockquote -- blockquote
{ pattern = "^%s*>+%s", type = "string" }, { pattern = "^%s*>+%s", type = "string" },
-- alternative bold italic formats -- alternative bold italic formats
{ pattern = { "%s___", "___%f[%s]" }, type = "markdown_bold_italic" }, { pattern = { "%s___", "___" }, type = "markdown_bold_italic" },
{ pattern = { "%s__", "__%f[%s]" }, type = "markdown_bold" }, { pattern = { "%s__", "__" }, type = "markdown_bold" },
{ pattern = { "%s_[%S]", "_%f[%s]" }, type = "markdown_italic" }, { pattern = { "%s_[%S]", "_" }, type = "markdown_italic" },
-- reference links -- reference links
{ {
pattern = "^%s*%[%^()["..in_squares_match.."]+()%]: ", pattern = "^%s*%[%^()["..in_squares_match.."]+()%]: ",
@ -166,9 +166,9 @@ syntax.add {
type = "markdown_italic" type = "markdown_italic"
}, },
-- alternative bold italic formats -- alternative bold italic formats
{ pattern = "^___[%s%p%w]+___%s" , type = "markdown_bold_italic" }, { pattern = "^___[%s%p%w]+___" , type = "markdown_bold_italic" },
{ pattern = "^__[%s%p%w]+__%s" , type = "markdown_bold" }, { pattern = "^__[%s%p%w]+__" , type = "markdown_bold" },
{ pattern = "^_[%s%p%w]+_%s" , type = "markdown_italic" }, { pattern = "^_[%s%p%w]+_" , type = "markdown_italic" },
-- heading with custom id -- heading with custom id
{ {
pattern = "^#+%s[%w%s%p]+(){()#[%w%-]+()}", pattern = "^#+%s[%w%s%p]+(){()#[%w%-]+()}",