Skip to content

Commit

Permalink
Merge pull request #44 from jd-boyd/jdb_quoted_specials
Browse files Browse the repository at this point in the history
Remove \ from . in dumps.
  • Loading branch information
jd-boyd authored Jun 6, 2023
2 parents b01f014 + b8ff78a commit be1d321
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ jobs:
- ubuntu-latest
- macos-latest
- windows-latest
exclude:
# Macos runner is slowest, so reduce how many of the cases
# it does.
- os: macos-latest
python-version: 'pypy-3.8'
- os: macos-latest
python-version: 'pypy-3.9'
- os: macos-latest
python-version: 3.8
- os: macos-latest
python-version: 3.9
- os: macos-latest
python-version: "3.10"
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} @ ${{ matrix.python-version }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion sexpdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ class Symbol(String):
('\\', '\\\\'), # must come first to avoid doubly quoting "\"
("'", r"\'"), ("`", r"\`"), ('"', r'\"'),
('(', r'\('), (')', r'\)'), ('[', r'\['), (']', r'\]'),
(' ', r'\ '), ('.', r'\.'), (',', r'\,'), ('?', r'\?'),
(' ', r'\ '), (',', r'\,'), ('?', r'\?'),
(';', r'\;'), ('#', r'\#'),
]

Expand Down
2 changes: 1 addition & 1 deletion test_sexpdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def assert_parse(self, string, obj):
class TestSymbol(BaseTestCase):

def test_parse_symbol_with_backslash(self):
self.assert_parse(r'path\.join', Symbol(r'path.join'))
self.assert_parse(r'path.join', Symbol(r'path.join'))
self.assert_parse(r'path\ join', Symbol(r'path join'))
self.assert_parse(r'path\\join', Symbol(r'path\join'))

Expand Down

0 comments on commit be1d321

Please sign in to comment.