Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line continuations not supported? #51

Closed
bjourne opened this issue Dec 12, 2012 · 3 comments
Closed

Line continuations not supported? #51

bjourne opened this issue Dec 12, 2012 · 3 comments

Comments

@bjourne
Copy link

bjourne commented Dec 12, 2012

It seems like expressions broken over multiple lines does not work. The following:

mixin styles("/static/css", [ 
    "skeleton/base", 
    "skeleton/layout", 
    "skeleton/skeleton",     
    "style"])  

Produces a long traceback:

File "C:\Python27\lib\site-packages\jinja2-2.5.5-py2.7.egg\jinja2\parser.py", line 32, in __init__
self.stream = environment._tokenize(source, name, filename, state)
  File "C:\Python27\lib\site-packages\jinja2-2.5.5-py2.7.egg\jinja2\environment.py", line 428, in     _tokenize
    source = self.preprocess(source, name, filename)
  File "C:\Python27\lib\site-packages\jinja2-2.5.5-py2.7.egg\jinja2\environment.py", line 422, in     preprocess
    self.iter_extensions(), unicode(source))
  File "C:\Python27\lib\site-packages\jinja2-2.5.5-py2.7.egg\jinja2\environment.py", line 421, in     <lambda>
    return reduce(lambda s, e: e.preprocess(s, name, filename),
  File "C:\Python27\lib\site-packages\pyjade\ext\jinja.py", line 104, in preprocess
    return process(source,filename=name,compiler=Compiler)
  File "C:\Python27\lib\site-packages\pyjade\utils.py", line 221, in process
    block = _parser.parse()
  File "C:\Python27\lib\site-packages\pyjade\parser.py", line 47, in parse
    else: block.append(self.parseExpr())
  File "C:\Python27\lib\site-packages\pyjade\parser.py", line 84, in parseExpr
    return getattr(self,funcName)()
  File "C:\Python27\lib\site-packages\pyjade\parser.py", line 306, in parseTag
    block = self.block()
  File "C:\Python27\lib\site-packages\pyjade\parser.py", line 249, in block
    block.append(self.parseExpr())
  File "C:\Python27\lib\site-packages\pyjade\parser.py", line 84, in parseExpr
    return getattr(self,funcName)()
  File "C:\Python27\lib\site-packages\pyjade\parser.py", line 306, in parseTag
    block = self.block()
  File "C:\Python27\lib\site-packages\pyjade\parser.py", line 249, in block
    block.append(self.parseExpr())
  File "C:\Python27\lib\site-packages\pyjade\parser.py", line 87, in parseExpr
    (t, self.filename, self.line()))
Exception: unexpected token "attrs" in file index.jade on line 10
@syrusakbary
Copy link
Owner

The multiline is only supported in tag attrs

@bjourne
Copy link
Author

bjourne commented Dec 12, 2012

But it is supported in regular Jade, isn't it?

@syrusakbary
Copy link
Owner

I dont think so :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants