Skip to content

Commit 1ca3fac

Browse files
committed
Fixed mutliline, it was "/n" instead of "\n" in the encode method
1 parent 643d5d3 commit 1ca3fac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/selfie-lib/selfie_lib/Literals.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def encode(
8181
self, value: str, language: Language, encoding_policy: EscapeLeadingWhitespace
8282
) -> str:
8383
if language == Language.PYTHON:
84-
if "/n" not in value:
84+
if "\n" not in value:
8585
return self._encodeSinglePython(value)
8686
else:
8787
return self.encodeMultiPython(value, encoding_policy)
@@ -134,14 +134,14 @@ def _parseSinglePython(self, source_with_quotes: str) -> str:
134134
source = source_with_quotes[1:-1]
135135
to_unescape = self.inline_backslashes(source) # changed from inline_dollar
136136
return self._unescape_python(to_unescape)
137-
137+
138138
def encodeMultiPython(
139139
self, arg: str, escape_leading_whitespace: EscapeLeadingWhitespace
140140
) -> str:
141141
escape_backslashes = arg.replace("\\", "\\\\")
142142
escape_triple_quotes = escape_backslashes.replace(TRIPLE_QUOTE, '\\"\\"\\"')
143-
144-
def protect_trailing_whitespace(line):
143+
144+
def protect_trailing_whitespace(line: str) -> str:
145145
if line.endswith(" "):
146146
return line[:-1] + "\\u0020"
147147
elif line.endswith("\t"):

0 commit comments

Comments
 (0)