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

Javascript not working #49

Closed
romanoff opened this issue Jan 19, 2014 · 4 comments
Closed

Javascript not working #49

romanoff opened this issue Jan 19, 2014 · 4 comments

Comments

@romanoff
Copy link

I tried to use otto to render soy template, but it didn't seem to work. Here is javascript example:
http://pastebin.com/wvvGABEr

When I use node.js, seems to work just fine.

@robertkrimen
Copy link
Owner

I get this error:

SyntaxError: Invalid regular expression: invalid or unsupported Perl syntax: `(?!` (line 2567)

Unfortunately, we're using Go's regular expression engine, which doesn't have some nifty features: http://code.google.com/p/re2/

@DAddYE
Copy link

DAddYE commented Dec 19, 2014

@robertkrimen isn't possible to switch to something pcre like? I know it requires cgo but we can use a build flag when we don't want that.

I wanted to use otto for compiling less or react none of them works and I bet most of templating languages.

@xyproto
Copy link
Contributor

xyproto commented Jul 25, 2016

Does it work if you use this fork of otto instead? (same changes as in pull request #205). It's supposed to be compatible with how regex is handled in JavaScript, but needs more testing. (The pastebin page above is gone, so I can't test it).

@stevenh
Copy link
Collaborator

stevenh commented Nov 29, 2022

Example not available any more, so closing.

@stevenh stevenh closed this as completed Nov 29, 2022
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

5 participants