Stream: beginners

Topic: ✔ Web REPL not working


view this post on Zulip JRI98 (Feb 04 2024 at 11:17):

In the Web REPL (https://www.roc-lang.org/repl), when pressing Enter to submit code, a new line is created instead of the code being run

view this post on Zulip Folkert de Vries (Feb 04 2024 at 12:12):

yeah, weird. @Richard Feldman I see this JS error in the console

Uncaught SyntaxError: Invalid regular expression: /^["][^\\]+\\$(name\)/i: Unterminated group (at site.js:46:37)

view this post on Zulip Folkert de Vries (Feb 04 2024 at 12:14):

@Anton you changed this line here https://github.com/roc-lang/roc/pull/6488/files#diff-1abe063b1675d8faf77e0dfc993f55ee92e628f07276372e94339bcb60b09c02L46

view this post on Zulip Folkert de Vries (Feb 04 2024 at 12:15):

I guess the $ also needs to be escaped there?

view this post on Zulip Richard Feldman (Feb 04 2024 at 12:17):

yep, that would explain it!

view this post on Zulip Richard Feldman (Feb 04 2024 at 12:18):

just needs to be \$

view this post on Zulip Richard Feldman (Feb 04 2024 at 12:18):

I'm on mobile but if anyone can make a quick PR for that, I can approve it

view this post on Zulip Folkert de Vries (Feb 04 2024 at 12:56):

https://github.com/roc-lang/roc/pull/6501

view this post on Zulip Folkert de Vries (Feb 04 2024 at 14:31):

I don't think that actually fixes the issue

view this post on Zulip Folkert de Vries (Feb 04 2024 at 14:32):

Uncaught SyntaxError: Invalid regular expression: /^["][^\\]+\\\$(name\)/i: Unterminated group (at site.js:46:37)

view this post on Zulip Richard Feldman (Feb 04 2024 at 14:34):

oh it also needs one before the (

view this post on Zulip Richard Feldman (Feb 04 2024 at 14:34):

/^["][^\\]+\\\$\(name\)/i

view this post on Zulip JRI98 (Feb 04 2024 at 15:20):

Actually I think it should be something like /^"[^\$]+\$\(name\)/i, otherwise it will try to match a backslash followed by a dollar sign

view this post on Zulip Richard Feldman (Feb 04 2024 at 15:56):

yeah I think you're right @John River! :thumbs_up:

view this post on Zulip Richard Feldman (Feb 04 2024 at 15:56):

want to make a PR for that?

view this post on Zulip JRI98 (Feb 04 2024 at 16:10):

I'm on mobile so only later today

view this post on Zulip JRI98 (Feb 04 2024 at 16:11):

Anyone feel free to make the change in the meantime :smile:

view this post on Zulip Richard Feldman (Feb 04 2024 at 16:32):

I'm also on mobile haha, sounds good!

view this post on Zulip Anton (Feb 05 2024 at 09:40):

https://github.com/roc-lang/roc/pull/6504

view this post on Zulip JRI98 (Feb 05 2024 at 13:10):

I totally forgot :melting_face:
Thanks @Anton

view this post on Zulip Anton (Feb 05 2024 at 15:58):

The repl is fixed now :)

view this post on Zulip Notification Bot (Feb 05 2024 at 15:58):

Anton has marked this topic as resolved.


Last updated: Jul 06 2025 at 12:14 UTC