Skip to content

Commit a257cb9

Browse files
committed
Bump version
1 parent 9e94f49 commit a257cb9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mkdocs-include-markdown-plugin"
3-
version = "5.0.0"
3+
version = "5.1.0"
44
description = "Mkdocs Markdown includer plugin."
55
readme = "README.md"
66
license = "Apache-2.0"

src/mkdocs_include_markdown_plugin/directive.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class DirectiveBoolArgument(TypedDict): # noqa: D101
3232
)
3333

3434

35+
RE_ESCAPED_PUNCTUATION = re.escape(string.punctuation)
36+
3537
DOUBLE_QUOTED_STR_RE = r'([^"]|(?<=\\)["])+'
3638
SINGLE_QUOTED_STR_RE = r"([^']|(?<=\\)['])+"
3739

@@ -62,7 +64,7 @@ class DirectiveBoolArgument(TypedDict): # noqa: D101
6264

6365
def arg(arg: str) -> re.Pattern[str]:
6466
"""Return a compiled regexp to match a boolean argument."""
65-
return re.compile(rf'{arg}=([-\w]*)')
67+
return re.compile(rf'{arg}=([{RE_ESCAPED_PUNCTUATION}\w]*)')
6668

6769

6870
def str_arg(arg: str) -> re.Pattern[str]:

0 commit comments

Comments
 (0)