8000 fix definition of multiple ']' in header · python/cpython@46751c6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 46751c6

Browse files
authored
fix definition of multiple ']' in header
in old version in example header is "[i love [python] lang]" parse as "i love [python", only up to the first character ']'. once fixed, multiple ']' can be used and this will not cause the header to be clipped. now saving works correctly, but reading does not
1 parent befa032 commit 46751c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/configparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ class RawConfigParser(MutableMapping):
563563
# Regular expressions for parsing section headers and options
564564
_SECT_TMPL = r"""
565565
\[ # [
566-
(?P<header>[^]]+) # very permissive!
566+
(?P<header>.*) # very permissive!
567567
\] # ]
568568
"""
569569
_OPT_TMPL = r"""

0 commit comments

Comments
 (0)
0