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

Better tab indent awareness #273

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions tests/indents/formatted-2-spaces.pug
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,56 @@ html
p text text
|
| text

#man-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")
53 changes: 53 additions & 0 deletions tests/indents/formatted-3-spaces.pug
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,56 @@ html
p text text
|
| text

#man-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")
56 changes: 56 additions & 0 deletions tests/indents/formatted-4-spaces.pug
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,59 @@ html
p text text
|
| text

#man-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")
115 changes: 115 additions & 0 deletions tests/indents/formatted-8-spaces.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
doctype html
html
head
body
h1#title Lets get pugging!
p I'm a paragraph
p.
I'm a multi-line paragraph!
And this is the second line.
p.para.
This paragraph has class!
.firstDiv A div with a class.
#secondDiv A div with an id.

// Things
div(v-if="things")
.box.flex-box
.flex-main-wrapper
.flex-box.header {{ $t('mylangkey.things') }}

.flex-box.select(
v-if="things[0].visible"
)
v-autocomplete(
name="things[0].name",
v-model="things[0].value",
item-text="name",
item-value="id",
:items="mythings"
)

.flex-box.select(
v-if="things[1].visible"
)
v-autocomplete(
name="things[1].name",
v-model="things[1].value",
item-text="name",
item-value="id",
:items="mythings"
)

#use-of-id(test)
span Hello

p text text
|
| text

p text text
|
| text

#man-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"
)
48 changes: 48 additions & 0 deletions tests/indents/formatted-tabs.pug
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,51 @@ html
p text text
|
| text

#man-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")
Loading