liuderchi / ide-html

:atom: Atom-IDE for HTML, Go Template, Mustache and other Templates

Home Page:https://atom.io/packages/ide-html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong Outline

imambungo opened this issue · comments

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

  • Version used: 0.4.2
  • Operating System and version (desktop): Windows 10

Sorry for bad english.

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

@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.