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

Bug: More issues with plain-text and nesting #138

Closed
lehni opened this issue Oct 5, 2020 · 4 comments · Fixed by #139
Closed

Bug: More issues with plain-text and nesting #138

lehni opened this issue Oct 5, 2020 · 4 comments · Fixed by #139
Assignees
Labels
type: bug Functionality that does not work as intended/expected

Comments

@lehni
Copy link
Collaborator

lehni commented Oct 5, 2020

I thought I tackled this in #135, but there is more to it. When there is more nesting, then things end up on the wrong level:

Input

div
  div
    | Click here:
    a(href="mailto:hi@gmail.com")
      | hi@gmail.com
    | to get in touch with us

Expected Output

div
  div
    | Click here:
    a(href="mailto:hi@gmail.com")
      | hi@gmail.com
    | to get in touch with us

Actual Output

div
  div
    | Click here:
    a(href="mailto:hi@gmail.com")
      | hi@gmail.com
  | to get in touch with us

The last line is on the wrong level, it should be indented one level further

@Shinigami92
Copy link
Member

Looks like a need of computedIndent in line

result += this.indentString;
to me

Hopefully this can guide you

@lehni
Copy link
Collaborator Author

lehni commented Oct 5, 2020

Yes I just found that out also! :D

lehni added a commit that referenced this issue Oct 5, 2020
@Shinigami92 Shinigami92 added the type: bug Functionality that does not work as intended/expected label Oct 5, 2020
@Shinigami92
Copy link
Member

@lehni Are you directly affected by this bug?
Or can we wait on some other PRs before releasing the next version?

@lehni
Copy link
Collaborator Author

lehni commented Oct 5, 2020

@Shinigami92 I am, but it's easy enough to work around. I can wait for more PRs!

div
  div
    | Click here:
    a(href="mailto:hi@gmail.com")
      | hi@gmail.com
    // Workaround for plugin-pug bug: https://github.com/prettier/plugin-pug/issues/138
    | to get in touch with us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants