liuderchi / ide-html

:atom: Atom-IDE for HTML, Go Template, Mustache and other Templates
https://atom.io/packages/ide-html
MIT License
20 stars 5 forks source link

Wrong Outline #28

Open imambungo opened 6 years ago

imambungo commented 6 years ago

Description

Wrong tag level in outline view.

Expected Behavior

The body tag should be in the same level as the head tag.

nahbug2

Actual Behavior

It take the body tag as a child of the head tag.

nahbug

Possible Fix

It's happen when the body tag doesn't have any tag within it. I think the body tag should be the same level as the head tag because it is on the outside of the head tag.

Context

It's confusing, it's not just the body tag, but also all tag that doesn't have any tag within it.

Your Environment

Sorry for bad english.

liuderchi commented 6 years ago

Confirm repro. Sorry for the late reply.

After examining the debug message, it's more likely a CSS styling issue. body tag without child node has more left-padding space, which is unexpected.

You may test it by moving whole <body></body> to prior to head tag. Probably looks like this:

screen shot 2018-04-26 at 10 20 15 pm

liuderchi commented 6 years ago

@imambungo I've created an issue to atom-ide-ui team that ide-html depends on.

Hopefully we can find the root cause and fix it.