[ 
https://issues.apache.org/jira/browse/VELOCITY-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876350#comment-17876350
 ] 

Nathan Bubna edited comment on VELOCITY-962 at 8/23/24 7:13 PM:
----------------------------------------------------------------

I think it would be better to error. It would be all too easy to delete a 
closing ]]# and have following template syntax treated as literal.


was (Author: nbubna):
I think it would be better to error. It would be all too easy to delete a 
closing ]]# and have have following template syntax treated as literal.

> Unclosed #[[ is no longer an error
> ----------------------------------
>
>                 Key: VELOCITY-962
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-962
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 2.3
>            Reporter: Éamonn McManus
>            Priority: Minor
>
> With Velocity 1.7, if you had {{#[[ without ]]#}} then you would get an 
> exception like this:
> {noformat}
> org.apache.velocity.runtime.parser.ParseException: Lexical error: 
> org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 4, 
> column 5.  Encountered: <EOF> after : ""
>         at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:136)
>         at 
> org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1226)
>         at 
> org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1181){noformat}
> However, with 2.3 this is just silently accepted. I think it would be better 
> to continue to throw an exception, and better still if the exception message 
> indicated where the {{#[[}} started.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to