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 sep directive in syntax A breaks templates in syntax B #119

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Fix sep directive in syntax A breaks templates in syntax B #119

merged 2 commits into from
Nov 29, 2024

Conversation

binokkio
Copy link
Contributor

I noticed compiling a template containing <#sep> using a configuration specifying the square bracket tag syntax fails with a freemarker.core.ParseException: Syntax error in template "X" in line Y, column Z: #sep must be inside a #list (or #foreach) block. I think <#sep> should be ignored instead as it is not using the square bracket syntax.

This PR adds a unit test covering that case, a change in FTL.jj that solves the issue, and fixes a typo.

./gradlew check runs successfully for me with these changes, but I do not know the Freemarker codebase well enough to be confident that it does not introduce other issues.

I'd be happy to improve this PR if there is any feedback.

@ddekany
Copy link
Contributor

ddekany commented Nov 27, 2024

Do you have an ICLA signed at Apache? Otherwise I can't merge code changes that are not entirely trivial. If not, I can just redo this without looking, now that the issue is known (Thanks!). Or you may prefer to sign the ICLA.

@binokkio
Copy link
Contributor Author

I don't have an ICLA, but I'm happy to sign it. Any specific instructions or shall I just follow https://www.apache.org/licenses/contributor-agreements.html#submitting ? Thanks!

@ddekany
Copy link
Contributor

ddekany commented Nov 27, 2024

Just follow that, yes. It's ASF-wide.

@binokkio
Copy link
Contributor Author

I have received confirmation that the ICLA has been filed in the ASF records, I think you might need the id cwr to find it.

@ddekany ddekany merged commit 66c94aa into apache:2.3-gae Nov 29, 2024
2 checks passed
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.

2 participants