Skip to content

Commit e99aa5f

Browse files
committed
Account for unrelated attributes in fenced code block
1 parent 3db5725 commit e99aa5f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pr_summary_regex = "^```release-note\\s*(?P<summary>[\\s\\S]*?\\w[\\s\\S]*?)\\s*
110110
#
111111
# If you modify this regex, make sure to match the content with a capture
112112
# group named "label".
113-
pr_summary_label_regex = """{label=[\\"'](?P<label>[^}]+)[\\"']}"""
113+
pr_summary_label_regex = """{[^}]*?label=[\\"](?P<label>[^\\"]+)[^}]*?}"""
114114

115115
# If any of a pull request's labels matches one of the regexes on the left side
116116
# its summary will appear in the appropriate section with the title given on

src/changelist/default_config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pr_summary_regex = "^```release-note\\s*(?P<summary>[\\s\\S]*?\\w[\\s\\S]*?)\\s*
5858
#
5959
# If you modify this regex, make sure to match the content with a capture
6060
# group named "label".
61-
pr_summary_label_regex = """{label=[\\"'](?P<label>[^}]+)[\\"']}"""
61+
pr_summary_label_regex = """{[^}]*?label=[\\"](?P<label>[^\\"]+)[^}]*?}"""
6262

6363
# If any of a pull request's labels matches one of the regexes on the left side
6464
# its summary will appear in the appropriate section with the title given on

test/test_objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_from_pull_requests(self, caplog):
4040
Document how to test for oddness of a number.
4141
```
4242
43-
```release-note {label="Bug fix"}
43+
```release-note {.someClass label="Bug fix" otherAttribute="test"}
4444
Make `is_odd()` work for negative numbers.
4545
```
4646
"""

0 commit comments

Comments
 (0)