| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -509,7 +509,7 @@ def string_decode(v: str) -> str: | |||
| 509 | 509 | is_multi_line = True | |
| 510 | 510 | optval = string_decode(optval[1:]) | |
| 511 | 511 | elif len(optval) > 1 and optval[0] == '"' and optval[-1] == '"': | |
| 512 | - optval = optval[1:-1].strip() | ||
| 512 | + optval = optval[1:-1] | ||
| 513 | 513 | # END handle multi-line | |
| 514 | 514 | # Preserves multiple values for duplicate optnames. | |
| 515 | 515 | cursect.add(optname, optval) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + [core] | ||
| 2 | + commentString = "# " | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -412,6 +412,10 @@ def test_config_with_quotes(self): | |||
| 412 | 412 | self.assertEqual(cr.get("user", "name"), "Cody Veal") | |
| 413 | 413 | self.assertEqual(cr.get("user", "email"), "cveal05@gmail.com") | |
| 414 | 414 | ||
| 415 | + def test_config_with_quotes_with_literal_whitespace(self): | ||
| 416 | + cr = GitConfigParser(fixture_path("git_config_with_quotes_whitespace"), read_only=True) | ||
| 417 | + self.assertEqual(cr.get("core", "commentString"), "# ") | ||
| 418 | + | ||
| 415 | 419 | def test_get_values_works_without_requiring_any_other_calls_first(self): | |
| 416 | 420 | file_obj = self._to_memcache(fixture_path("git_config_multiple")) | |
| 417 | 421 | cr = GitConfigParser(file_obj, read_only=True) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments