-
-
Notifications
You must be signed in to change notification settings - Fork 43
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: Incorrect wrapping when useTabs: true
, assumes tab is 0 width
#268
Comments
I've been working on the indentation tests and this triggers the problem. doctype html
html
head
body
#indentation-tests
.short(style="display: none") Hello World
.getting-longer(style="display: none") I can't just say "Hello World" here
.i-am-not-being-creative-with-these-names(style="display: none", color="red").
There is surely more I could write here
.short-again(style="display: none", color="red", font="Sans Serif")
| I could surely more I could write here
.hi(
data-wrap="false"
) This should be wrapped
section#contact
.container
h3 Contact
form(name="contact", method="POST")
.row.gtr-uniform
.col-6.col-12-x-small
input#name(type="text", name="name", placeholder="Name *", required )
.col-6.col-12-x-small
input#email( type="email", name="email", placeholder="Email *", required )
.col-12
input#subject( type="text", name="subject", placeholder="Subject *", required )
.col-12
textarea#message( name="message", placeholder="Message *", rows="6", required )
.col-12
ul.actions
li
input.primary( type="submit", value="Send Message" )
li
input( type="reset", value="Reset Form" ) Which produces a diff of: $ diff .idea/test-2-{spaces,tabs}.pug
69,74c69
< input#name(
< type="text",
< name="name",
< placeholder="Name *",
< required
< )
---
> input#name(type="text", name="name", placeholder="Name *", required)
76,81c71
< input#email(
< type="email",
< name="email",
< placeholder="Email *",
< required
< )
---
> input#email(type="email", name="email", placeholder="Email *", required) |
This is still a bug. Should I open a new issue? |
Yeah, either please open a new one with new example or directly open a PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Info
Prettier config
Input
Output or Error
Formatting with spaces instead of tabs
Expected Output
Additional Context
When using
useTabs: false
, it wraps correctly. Otherwsie wrapping doesn't account of the indent width and just assumes 0-width tabs.The text was updated successfully, but these errors were encountered: