Permalink
Browse files

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

--HG--
branch : sneakylang
  • Loading branch information...
1 parent 259cf4a commit 4fc5e8b9130ba58d9f6e089547551a19e74d0999 andros committed Apr 12, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 sneakylang/macro_caller.py
@@ -189,7 +189,7 @@ def get_content(stream):
""" 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
@@ -260,4 +260,4 @@ def expand_macro_from_stream(stream, register, builder, state):
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)

0 comments on commit 4fc5e8b

Please sign in to comment.