Skip to content

Commit

Permalink
Fix NormalizedString serialization splitting within escape sequences.
Browse files Browse the repository at this point in the history
Resolves #1589
  • Loading branch information
progval authored Aug 25, 2024
1 parent b075a94 commit 603cb60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,10 @@ def setValue(self, s):
def serialize(self):
s = self.__parent.serialize()
prefixLen = len(self._name) + 2
lines = textwrap.wrap(s, width=76-prefixLen)
# break_long_words=False so we don't split in the middle of a
# unicode_escape sequence when there are multiple escape sequences in a
# row.
lines = textwrap.wrap(s, width=76-prefixLen, break_long_words=False)
last = len(lines)-1
for (i, line) in enumerate(lines):
if i != 0:
Expand Down

0 comments on commit 603cb60

Please sign in to comment.