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

fix issue 114 #115

Merged
merged 2 commits into from Dec 3, 2015
Merged

fix issue 114 #115

merged 2 commits into from Dec 3, 2015

Conversation

jsnyders
Copy link
Contributor

I believe this is one way to fix the issue 114. When a <% %> template was used as a dictionary value the %'s were not being stripped.
I tested the change with this group template

delimiters "$","$"
d1 ::= [
  "p": <%hi%>
]
main() ::= <<$d1.p$>>

and the problem was fixed (expected result hi was returned).

Fixes #114

@sharwell
Copy link
Member

I think you have the right idea for a solution. Do you mind adding a test to help prevent future regressions? My suggestion would be to place it here, and include a comment like this so everyone knows it was added for a specific reason. If you have any questions, or if you don't have time and wish for one of the other authors to create the test instead, please let us know. 😄

@sharwell
Copy link
Member

❗ You'll need to add your name to contributors.txt before we can accept code contributions. Note that this is a one-time thing. If you prefer, you can add your name to the ANTLR 4 contributors list instead, which will cover StringTemplate as well as other projects in the ANTLR organization.

@jsnyders
Copy link
Contributor Author

I will add a test case. My Java skills are rusty. I have to remember how to run jUnit tests.
I will add my name to contributors.txt

@jsnyders
Copy link
Contributor Author

I added a test case and updated contributors.txt in the same commit. Let me know if I didn't do it correctly.
It would be helpful if the ant script had a target for building and running the tests but I figured it out.

parrt added a commit that referenced this pull request Dec 3, 2015
@parrt parrt merged commit be4287f into antlr:master Dec 3, 2015
@parrt
Copy link
Member

parrt commented Dec 3, 2015

thanks! Sorry it took so long ;)

@parrt parrt added this to the 4.0.9 milestone Nov 7, 2018
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

Successfully merging this pull request may close these issues.

dictionary value using <% %> is broken
3 participants