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

Broken indentation in indented code blocks #1509

Open
1 task
skshetry opened this issue Jun 29, 2020 · 9 comments
Open
1 task

Broken indentation in indented code blocks #1509

skshetry opened this issue Jun 29, 2020 · 9 comments
Labels
A: website Area: website 🐛 type: bug Something isn't working. website: eng-doc DEPRECATED JS engine for /doc

Comments

@skshetry
Copy link
Member

skshetry commented Jun 29, 2020

Expand the section Expand to see what happens under the hood. on https://dvc.org/doc/start/data-pipelines#pipeline-stages. The params.yaml is incorrectly rendered (indentation that is).

```yaml
prepare:
split: 0.20
seed: 20170428
```

It seems to be correctly written. Maybe something wrong with rendering it?

UPDATE See #1509 (comment)

  • Review all indented code blocks after this is solved.
@shcheklein shcheklein added 🐛 type: bug Something isn't working. good first issue Good for newcomers help wanted Contributors especially welcome p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. website: eng-doc DEPRECATED JS engine for /doc labels Jun 29, 2020
@shcheklein
Copy link
Member

Fixed, had to un-indent the whole block for this to work. Weird. Will keep this as a doc engine bug.

If yaml code block is indented to be under a bullet item rendering breaks.

@jorgeorpinel
Copy link
Contributor

That code block was correctly indented though, it's part of a bullet. Now it's uneven (compare to the next block):

image

@shcheklein
Copy link
Member

This is a temporary workaround. This engine bug.

@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented May 10, 2021

I changed the workaround in #2458 so the block is rendered aligned.

@jorgeorpinel jorgeorpinel added p1-important Active priorities to deal within next sprints and removed good first issue Good for newcomers help wanted Contributors especially welcome p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. labels May 10, 2021
@jorgeorpinel jorgeorpinel changed the title yaml incorrectly rendered broken indentation in indented code blocks May 10, 2021
@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented May 10, 2021

Expand the section Expand to see what happens under the hood. on https://dvc.org/doc/start/data-pipelines#pipeline-stages.

BTW this also happens in the git block under that YAML block too:

image

So this probably applies to indentation with many all kinds of code blocks that are indented themselves.

UPDATE: Another place where this if currently manifested is in the remote add/modify refs per-type sections. Some of them are using workarounds to render correctly, some others not.

@jorgeorpinel

This comment was marked as outdated.

@rogermparent

This comment was marked as outdated.

@jorgeorpinel

This comment was marked as outdated.

@shcheklein shcheklein added p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. A: website Area: website and removed p1-important Active priorities to deal within next sprints labels Jul 26, 2021
@jorgeorpinel jorgeorpinel removed the p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. label May 4, 2022
@jorgeorpinel jorgeorpinel changed the title broken indentation in indented code blocks Broken indentation in indented code blocks May 4, 2022
@jorgeorpinel
Copy link
Contributor

Just a note that this is still a bug. Not a common thing we run into but the workaround (adding extra spaces) conflicts with the linter in some cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: website Area: website 🐛 type: bug Something isn't working. website: eng-doc DEPRECATED JS engine for /doc
Projects
None yet
Development

No branches or pull requests

4 participants