8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
The file client/build/index.html throws an error when parsed by the golang html/template package.
Steps to reproduce the behavior:
./scripts/build.prod.sh --server
./build/ratel
I would have expected the error not to occur
The exact error is
panic: Error parsing "index.html" contents
goroutine 1 [running]: github.com/dgraph-io/ratel/server.prepareIndexContent() /home/freddy.isaac/projects/ratel/server/server.go:112 +0x4c8 github.com/dgraph-io/ratel/server.Run() /home/freddy.isaac/projects/ratel/server/server.go:42 +0x25 main.main() /home/freddy.isaac/projects/ratel/main.go:11 +0xf
It is occurring on line 17 of the file index.html which is currently
function isTemplateAnnotation(str) { return ( str.indexOf("{{") === 0 && str.lastIndexOf("}}") === str.length - 2 ); }
However changing this code to be
function isTemplateAnnotation(str) { return str.indexOf("{{") === 0 && str.lastIndexOf("}}") === str.length - 2; }
does however parse OK!
I believe that this may be an issue with the golang html/template package and have opened a ticket here to clarify
golang/go#73061
The text was updated successfully, but these errors were encountered:
DGR-869 golang template parse error while parsing index.html
Sorry, something went wrong.
Of course the golang people just closed it a functions as designed so I decided to play with it a bit If you use
<script> function foo(str) { return str.indexOf({{"{{"}}) === 0 && str.lastIndexOf("}}") === str.length - 2; } </script>
The you get this
<script> function foo(str) { return str.indexOf("{{") === 0 && str.lastIndexOf("}}") === str.length - 2; } </script>
which may be what was intended ?
No branches or pull requests
Describe the bug
The file client/build/index.html throws an error when parsed by the golang html/template package.
To Reproduce
Steps to reproduce the behavior:
./scripts/build.prod.sh --server
./build/ratel
Expected behavior
I would have expected the error not to occur
Screenshots
The exact error is
panic: Error parsing "index.html" contents
goroutine 1 [running]:
github.com/dgraph-io/ratel/server.prepareIndexContent()
/home/freddy.isaac/projects/ratel/server/server.go:112 +0x4c8
github.com/dgraph-io/ratel/server.Run()
/home/freddy.isaac/projects/ratel/server/server.go:42 +0x25
main.main()
/home/freddy.isaac/projects/ratel/main.go:11 +0xf
It is occurring on line 17 of the file index.html which is currently
However changing this code to be
does however parse OK!
I believe that this may be an issue with the golang html/template package and have opened a ticket here to clarify
golang/go#73061
Environment
Additional context
The text was updated successfully, but these errors were encountered: