Can't dynamically include() object values #158

Closed
braco opened this Issue Mar 25, 2013 · 2 comments

Projects

None yet

2 participants

braco commented Mar 25, 2013
block something
  p something
  include locals.foo

yields:

500 SyntaxError: Parser error: Expected child node or newline but "." found. at 

This would also be nice to have:

include "../" + locals.foo
@bminer bminer was assigned Apr 23, 2013
Owner
bminer commented Apr 23, 2013

The problem here is that it would be difficult for the parser to detect the exposing keyword that follows the filename. Therefore, allowing things like include "../" + locals.foo would be a little too loose.

There are obvious workarounds like defining a variable just before the file include:

- var filename = //whatever you want
include filename

Closing this issue for now.

@bminer bminer closed this Apr 23, 2013
Owner
bminer commented Apr 23, 2013

Decided to allow Object properties separated by the period . Commit coming soon...

@bminer bminer added a commit that referenced this issue Apr 23, 2013
@bminer bminer Push to 3.2.4
Including a dynamic filename now works with identifiers and Object properties (closes #158)
Previously, including a file with a dynamic filename prevented "exposing" keyword from doing its job. This has now been fixed. (fixes #103)
Added new tests
756e599
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment