-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Implement .collectWithParameters() and .collectAllParameters() #637
Open
andrewboni
wants to merge
25
commits into
jknack:master
Choose a base branch
from
Iterable:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
b4323ab
Implement collectAllParameters() and collectWithParams() with Ilya
andrewboni 50b44a7
fix for Variable
dontgitit 61b42d8
Update comments and add the TagType for TagWithParams.
andrewboni d213d17
Update comments
andrewboni 46d885b
Add in tagType and fix test
andrewboni 8ee631e
Add additional test cases
andrewboni 6678deb
Update tests
andrewboni 8ba0497
Add built snapshot JAR to use until changes merged upstream
95a12c7
remove handlebars jar
223e7c7
Update tests, add in custom .toString()
andrewboni 4cbdfee
Merge branch 'master' of github.com:Iterable/handlebars.java
andrewboni 775086e
Add comments, fix style
andrewboni ded97c1
refactor name and package
dontgitit 6bce684
Merge remote-tracking branch 'upstream/master'
dontgitit acecec6
mark collect as deprecated
dontgitit 8b46b71
fix whitespace
dontgitit 1cd3eac
Merge remote-tracking branch 'upstream/master'
dontgitit fb4e295
add internal data
dontgitit 5ed8e52
add tests
dontgitit 25f80ba
add tests against direct context lookup
dontgitit ca2937d
fix test name
dontgitit e0f7722
Merge pull request #1 from Iterable/create-internal-storage
dontgitit ae4e84a
Merge remote-tracking branch 'upstream/master'
dontgitit 888f789
Merge branch 'jknack:master' into master
vbabenkoru 3b6506f
[TNT-7113] Use commit hashes for github repo actions
dennisiterable File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
24 changes: 24 additions & 0 deletions
24
handlebars/src/main/java/com/github/jknack/handlebars/internal/TagWithParams.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.github.jknack.handlebars.internal; | ||
import com.github.jknack.handlebars.TagType; | ||
|
||
import java.util.List; | ||
|
||
public class TagWithParams { | ||
private String tag; | ||
private List<Param> params; | ||
private TagType tagType; | ||
|
||
TagWithParams(String tag, List<Param> params, TagType tagType) { | ||
this.tag = tag; | ||
this.params = params; | ||
this.tagType = tagType; | ||
} | ||
|
||
public String getTag() { | ||
return tag; | ||
} | ||
public List<Param> getParams() { | ||
return params; | ||
} | ||
public TagType getTagType() { return tagType; } | ||
} |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this collecting nested hbars, for example
{{#if (anotherHelper) }}
? or is this doing something else?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't seem to currently; an input of
{{capitalize (lower firstName)}}
returnsTagWithParams(capitalize, firstName, TagType.VAR)
If I include
TagType.SUB_EXPRESSION
, it does work. Let me change the implementation totemplate.collectWithParameters(TagType.values())