Commits

andros  committed eacbe5a

Use splitlines() instead of split('\n')

  • Participants
  • Parent commits 3661bfc

Comments (0)

Files changed (1)

File sneakylang/macro_caller.py

     """ Return content of macro or None if proper end not resolved """
     if not ALLOW_MULTILINE_MACRO:
         #FIXME: (?) allow regexp macro_end...?
-        this_line = stream.split('\n')[0]
+        this_line = stream.splitlines()[0]
         if MACRO_END not in this_line:
             return None
 
     name, args = resolve_macro_name(macro_content)
     assert type(args) in (type(None), type(''), type(u'')), str(args)
     new_stream = stream[len(MACRO_BEGIN)+len(macro_content)+len(MACRO_END):]
-    return (register.macro_map[name].argument_call(args, register, builder, state), new_stream)
+    return (register.macro_map[name].argument_call(args, register, builder, state), new_stream)