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

Runkit embeds fail with error: Unable to load embed. Syntax error found in Preamble. See console for error. #9773

Closed
joelnet opened this issue Aug 13, 2020 · 12 comments · Fixed by #11466
Assignees
Labels
bug always open for contribution external contributors welcome contribution is welcome!

Comments

@joelnet
Copy link

joelnet commented Aug 13, 2020

Describe the bug

Runkit is reporting an error: Unable to load embed. Syntax error found in Preamble. See console for error.

The first 2 Runkit embeds seem to work fine. Others after are failing.

To Reproduce

  1. Go to https://dev.to/joelnet/creating-a-linked-list-using-only-function-combinators-5hhk
  2. Scroll to text Unable to load embed. Syntax error found in Preamble. See console for error.
  3. See error

Screenshots

https://uc5be8c7b8a7cdc7c2ce1a8c5040.previews.dropboxusercontent.com/p/thumb/AA6W6_WYsViw-ehSsvwbbiBP_WLnI2iVW7D0_m2_pX6sJBcCHUMqxGXEtBn9kgvv2Mi_YA1lHUax5Mn1QkvG7uZlFWLxYvW5KWSu6CFbHt7tOgjrAkT6X6_1ndIPwo7mtE5Q8HarJcbEm-EEOSRGFPQHx298D9tw1Z-ea-qT0U3thEHJ46ozPheVF1So0nEtOx5ZHeQooE0RZK97hVpMzpE6ozzWJZserOaZExyrXITUGpDpRrTseCvdn-taoO0VBPIAN7UG87R3v0G1i9NvNCAo6SaHBhJBLraL-XeeiRdlL4Vf29kgtsYIRKRfEdbc2gVCqDoUdWsTYMFXr6AyhDg42GrcGvbX08WyHOsYSjDMGAGFQeQTsEWHU7AQp4LIA-dAXC1vGlz2HxlvqoSIdGV3/p.png?fv_content=true&size_mode=5

Desktop (please complete the following information):

  • OS, version: Windows 10, IOS
  • Browser, version: Edge, FF, Chrome, Brave
@github-actions
Copy link
Contributor

Thanks for the issue! We'll take your request into consideration and follow up if we decide to tackle this issue.

To our amazing contributors: issues labeled type: bug are always up for grabs, but for feature requests, please wait until we add a ready for dev before starting to work on it.

To claim an issue to work on, please leave a comment. If you've claimed the issue and need help, please ping @forem/oss and we will follow up within 3 business days.

For full info on how to contribute, please check out our contributors guide.

@glebec
Copy link
Contributor

glebec commented Aug 14, 2020

Also seeing this in https://dev.to/glebec/monadic-parser-combinators-an-interactive-js-tutorial-pt-1-3jbo.

I think the problem is a regression bug in preamble support, but I haven't done more than a minute's worth of debugging yet or identified what would have caused such a regression (and when). See #662 and #696 for info on how/when preamble support was added.

Example of a snippet without preamble:

{% runkit %}
foo()
{% endrunkit %}

With preamble (possibly what is now breaking):

{% runkit
let bar = 5
%}
foo(bar)
{% endrunkit %}

@citizen428 citizen428 added area: liquid tags bug always open for contribution labels Aug 17, 2020
@citizen428
Copy link
Contributor

Thanks for digging into this @glebec! Would this be something you're interested in solving yourself or is this issue still up for grabs?

@glebec
Copy link
Contributor

glebec commented Aug 17, 2020

@citizen428 it is certainly up for grabs – I just wanted to provide a little context, but I don't know when I'll have the time to dig deeper.

@citizen428
Copy link
Contributor

No worries at all @glebec, thanks for clarifying.

@rhymes rhymes added external contributors welcome contribution is welcome! and removed external contributors welcome contribution is welcome! labels Oct 1, 2020
@rhymes rhymes added external contributors welcome contribution is welcome! and removed hacktoberfest labels Nov 5, 2020
@akashdotsrivastava
Copy link
Contributor

@rhymes Hi. I'd like to give this a shot if that's okay.

@rhymes
Copy link
Contributor

rhymes commented Nov 16, 2020

Hi @akashdotsrivastava, please go ahead! thanks!

@akashdotsrivastava
Copy link
Contributor

@joelnet Can you find some time to drop a couple of exact runkit tags with preamble you have included in the article https://dev.to/joelnet/creating-a-linked-list-using-only-function-combinators-5hhk, the ones which are giving the error Unable to load embed. Syntax error found in Preamble. See console for error.

Asking because I have tried the example above

{% runkit
let bar = 5
%}
foo(bar)
{% endrunkit %}

and it seems to render fine. An exact example would help.

@joelnet
Copy link
Author

joelnet commented Nov 17, 2020

@joelnet Can you find some time to drop a couple of exact runkit tags with preamble you have included in the article https://dev.to/joelnet/creating-a-linked-list-using-only-function-combinators-5hhk

I created a gist here so you can copy the raw https://gist.github.com/joelnet/55aede139467d110e276d0ab71e26776

@akashdotsrivastava
Copy link
Contributor

@joelnet Thank you 👍

@akashdotsrivastava
Copy link
Contributor

akashdotsrivastava commented Nov 18, 2020

@rhymes Thank you for assigning this to me. I added a PR for the fix.

@glebec
Copy link
Contributor

glebec commented Jan 28, 2021

I still had this error on https://dev.to/glebec/when-nesting-promises-is-correct-h8f. It turned out that opening the article in edit mode and saving changes fixed it, presumably because the article was re-run through the fixed text processing logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug always open for contribution external contributors welcome contribution is welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants