mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-25 08:43:36 +05:00
Squashed 'kiauh/core/submodules/simple_config_parser/' changes from 2698f60..7aa6586
7aa6586 fix: sections can have hyphens in their second word 44cedf5 fix(tests): fix whitespaces in expected output git-subtree-dir: kiauh/core/submodules/simple_config_parser git-subtree-split: 7aa658654eeb08fd53831effbfba4503a61e0eff
This commit is contained in:
@@ -85,7 +85,7 @@ class DuplicateOptionError(Exception):
|
||||
class SimpleConfigParser:
|
||||
"""A customized config parser targeted at handling Klipper style config files"""
|
||||
|
||||
_SECTION_RE = re.compile(r"\s*\[(\w+ ?\w+)]\s*([#;].*)?$")
|
||||
_SECTION_RE = re.compile(r"\s*\[(\w+\s?[\w\-]+)]\s*([#;].*)?$")
|
||||
_OPTION_RE = re.compile(r"^\s*(\w+)\s*[:=]\s*([^=:].*)\s*([#;].*)?$")
|
||||
_MLOPTION_RE = re.compile(r"^\s*(\w+)\s*[:=]\s*([#;].*)?$")
|
||||
_COMMENT_RE = re.compile(r"^\s*([#;].*)?$")
|
||||
|
||||
Reference in New Issue
Block a user