Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlei committed Aug 29, 2016
1 parent d10f2e3 commit cff388c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions smop/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,12 @@ def _backend(self,level=0):
@extend(node.string)
def _backend(self,level=0):
if "\n" in self.value:
fmt = '"""%s"""'
elif options.strings == "C":
fmt = '"%s"' % self.value.replace('"',r'\"')
elif options.strings == "F":
fmt = "'%s'" % self.value.replace("'",r"''")
return fmt % self.value
return '"""%s"""' % self.value
if options.strings == "C":
return 'r"%s"' % self.value.replace('"',r'\"')
if options.strings == "F":
return "r'%s'" % self.value.replace("'",r"''")
assert 0

@extend(node.sub)
def _backend(self,level=0):
Expand Down

0 comments on commit cff388c

Please sign in to comment.