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

TemplateSyntaxError: expected token 'end of print statement' #477

Closed
humiaozuzu opened this issue Aug 10, 2015 · 3 comments
Closed

TemplateSyntaxError: expected token 'end of print statement' #477

humiaozuzu opened this issue Aug 10, 2015 · 3 comments

Comments

@humiaozuzu
Copy link

This is the script inlined in HTML.

!function(){{var t=navigator.userAgent.match(/android/gi),e=navigator.userAgent.match(/iphone|ipod/gi),n=navigator.userAgent.match(/ipad/gi);/MicroMessenger/gi.test(navigator.userAgent)}e||n?document.getElementById("prompt").classList.add("ios-prompt"):t&&document.getElementById("prompt").classList.add("android-prompt")}(window,document);

Error raised when render

TemplateSyntaxError: expected token 'end of print statement', got 't'
@ThiefMaster
Copy link
Member

How is this a jinja issue? You have {{ in your string (I think you wanted { instead) which has a special meaning in Jinja.

@scharfmn
Copy link

scharfmn commented Sep 9, 2015

It was my error. (I assume the other fellow who reported the issue made a
similar error.)
I tried to retract my comment; I guess it stuck.
Thank you very much for checking.

On Wed, Sep 9, 2015 at 10:39 AM, Adrian notifications@github.com wrote:

How is this a jinja issue? You have {{ in your string which has a special
meaning in Jinja.


Reply to this email directly or view it on GitHub
#477 (comment).

@ashishsingal1
Copy link

Weird, but this actually helped me. Thanks for posting it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants