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
Allow "- var" and "-" statements for declaring variables within templates #92
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently, there isn't any support for `- var someVar = "someString" statements. They must be `someVar = "someString"`. This breaks compatibility with the official Jade library. So to remedy this issue, a RegEx replace statement has been added that looks for the `- var` statements, removes them, and lets the Scanner continue on normally.
larsonjj
changed the title
Update Scanner.java
Allow "- var" statements within templates
Feb 15, 2015
Updated `- var` regex remover to better avoid false positives
Thanks for the PR! Il will test it out in the next days. |
…ng variables Added more test cases
larsonjj
changed the title
Allow "- var" statements within templates
Allow "- var" and "-" statements for declaring variables within templates
Feb 16, 2015
Recompiling the regular expression inside a loop ( |
Moved RegEx compilation outside of loop for better performance.
Any update here? |
@larsonjj this repo is not active anymore. |
Updating from upstream
* master: Update README.md [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release jade4j-0.4.3 Fix failed tests on Java 8: issue #67. Add more versions of JDK to CI. issue89: Test files renamed (was #89 instead of #90). issue90: Saved example file provided in bug report. changed > to > in ArgumentSplitter's javadoc argument splitter now handles braces (but still very basic support) added tests that test splitting arguments with nested function calls version revert added getters (required when traversing ast) added compiler tests for 'comma bug' in 'mixin' node changed version name fixed 'quotes mistake' doc and comments string builder as local member instead of class member added test, fixed bugs, applied changes from review Proper splitting of arguments for mixin node performance improvement - short circuit if statements
This feature should be in 1.0.0 and up. So, close this Pull-Request. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, there isn't any support for
- var someVar = "someString"
or- someVar = "someString"
statements. They must besomeVar = "someString"
. This breaks compatibility with the official Jade library. So to remedy this issue, a RegEx replace statement has been added that looks for the- var
or-
statements, removes them, and lets the Scanner continue on normally.