Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 authored May 20, 2024
1 parent c022c29 commit a8c3432
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions changes/1746.bugfix.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
TOMLEscape class was fixed to properly escape doublequotes and backslash and the test files were corrected accordingly.
Now author creation can include single and double quotes at the time of creation
Escaping of quotation marks in TOML templates was corrected.
3 changes: 1 addition & 2 deletions src/briefcase/integrations/cookiecutter.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ def __init__(self, environment):
super().__init__(environment)

def escape_toml(obj):
"""Escapes string to match toml string requirements
https://toml.io/en/ v1.0.0#string."""
"""Escapes double quotes and backslashes."""
return obj.replace("\\", "\\\\").replace('"', '\\"')

def escape_non_ascii(obj):
Expand Down

0 comments on commit a8c3432

Please sign in to comment.