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: Code padded by extra lines #9743

Open
molgin opened this issue Aug 11, 2020 · 2 comments
Open

Runkit: Code padded by extra lines #9743

molgin opened this issue Aug 11, 2020 · 2 comments
Labels
area: media images, videos, podcasts, liquid tags, etc. bug always open for contribution

Comments

@molgin
Copy link

molgin commented Aug 11, 2020

Describe the bug

It seems impossible to have code start on line 1 of a Runkit block, or control the indentation on line 2.

To Reproduce

See this demo.

{% runkit %}
  const foo = {
    a: 1,
    b: 2
  }
{% endrunkit %}

yields no code on lines 1 or 2, plus two trailing lines:

screenshot

Meanwhile,

{% runkit %}const foo = {
    a: 1,
    b: 2
  }{% endrunkit %}

yields no code on line 1, and extra indentation on line 2, plus one trailing line:

screenshot

(Also, line numbers are partly cut off on mobile.)

Expected behavior

Expect code to start on line 1 with correct indentation, and no trailing lines.

Desktop:

  • OS, version: Mac OS 10.14.6
  • Browser, version: Brave Version 1.10.97 Chromium: 83.0.4103.116

Smartphone:

  • Device: Pixel 3 XL
  • OS, version: Android 10
  • Browser, version: Chrome version 84.0.4147.125
@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.

@rhymes rhymes added area: liquid tags bug always open for contribution labels Aug 12, 2020
@SiddharthShyniben
Copy link
Contributor

You can fix the indentation by removing it in the liquid tag itself:

{% runkit %}
const foo = {
  a: 1,
  b: 2
}
{% endrunkit %}

@cmgorton cmgorton added area: media images, videos, podcasts, liquid tags, etc. and removed area: liquid tags labels Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: media images, videos, podcasts, liquid tags, etc. bug always open for contribution
Projects
None yet
Development

No branches or pull requests

4 participants