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

invalid comment abbrevation of escaped unicode #2

Closed
jshinobi opened this issue Oct 14, 2015 · 0 comments
Closed

invalid comment abbrevation of escaped unicode #2

jshinobi opened this issue Oct 14, 2015 · 0 comments

Comments

@jshinobi
Copy link
Contributor

static public class Template ....LavinaRockerTemplate {
// \u042F \u043F\u043E\u043C\u043D\u044E \u0447\u0443\u0434\u043D\u043E\u0435 \u043C\u0433\u043D\u043E\u0432\u0435\u043D\u044C\u0435: \u041F\u0435\u0440\u0435\u0434\u043E \u043C\u043D\u043E\u0439 \u044F\u0432\u0438\u043B\u0430\u0441\u044C \u0442\u044B, \u041A\u0430\u043A \u043C\u0438\u043C\u043E\u043B\u0435\u0442\u043D\u043E\u0435 \u0432\u0438\u0434\u0435\u043D\u044C\u0435, \u041A\u0430\u043A \u0433\u0435\u043D\u0438\u0439 \u0447\u0438\u0441\u0442\u043E\u0439 \u043A\u0440\u0430\u0441\u043E\u044...
37 static private final byte[] PLAIN_TEXT_0_0;
38
39 static {
40 PlainTextUnloadedClassLoader loader = PlainTextUnloadedClassLoader.tryLoad(welcomeText.class.getName() + "$PlainText", "UTF-8");
41 PLAIN_TEXT_0_0 = loader.tryGet("PLAIN_TEXT_0_0");

com.fizzed.rocker.runtime.CompileDiagnosticException: Unable to compile rocker template(s) with 1 errors.
[ERROR] .../layouts/welcomeText.rocker.html
java: .../layouts/welcomeText.java:[36,509] illegal unicode escape

the method StringUtils.abbreviate in JavaGenerator should go before escaping,
or the better way is not to escape unicode at all, because unicode symbols will already be in the source file, and it does not make difference whether you would it escape in comment,
but it does make difference when you debug template in your own language for understanding what's going on.

Btw, thank you for your great engine.
From my expirience ninja + statically typed, tagless view - really enjoyable thing

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

No branches or pull requests

1 participant