emacs-pug-mode
emacs-pug-mode copied to clipboard
Small elements inside headings are not being indented
Is this still an issue? If so, could you offer an explanation, or better: a screenshot? I don't understand the problem.
Sure, sorry for not including a description I just noticed.
So I often write things like:
h1 Some heading
small Subheading
But when I write the small Subheading element, if I hit tab it doesn't get indented under the h1.
I haven't written Pug in a while so I don't remember exactly, but it was something like that, I hope it helps.
I'm not sure I follow. This is correct behavior for pug as far as I can tell, as h1 Some heading and small Subheading are two separate entities.
Pug lets you write inline tags (h1 Some heading) and block tags:
h1
Some heading
Perhaps I misunderstood the problem, but as far as I know you can't do both at the same time.
I was trying the following to confirm:
element Something
element Something else
It doesn't matter what the element is, when you write something like that and try to indent the second line nothing happens, you have to insert the spaces manually.
The expected behavior would be something like this:
element Something
element Something else
to produce:
<element>Something
<element>Something else</element>
</element>
But maybe I'm trying to do something wrong as you say (although it compiles as expected), perhaps it should be:
element
| Something
element Something else
in which tab for indentation works just fine.
Ah, I understand now. I was under the impression that this was illegal in pug templates. That throws a wrench into pug-mode's indentation heuristics. I'll need to rethink them.