TheRealSyler / sass-formatter

Sass(indented syntax) formatter written in typescript
https://sass-formatter.syler.de
MIT License
10 stars 2 forks source link

Incorrect formatting for unknown elements #64

Closed OpportunityLiu closed 2 years ago

OpportunityLiu commented 2 years ago

Describe the bug When formatting a nested unknown element, its properties' indent will be removed.

To Reproduce Format this

:host
  contain: content
  slot
    display: grid

Will get this

:host
  contain: content
  slot
  display: grid

Expected behavior Correct formatting of unknown elements

Screenshots If you add screen shots of code, please also paste the code as text so that i can just copy the code and reproduce the bug.

Desktop (please complete the following information):

Additional context image image

Also, the syntax highlighting of newly added elements and pseudo-classes is incorrect.

TheRealSyler commented 2 years ago

Thanks for letting me know, ill fix it later, the issue in both cases is that theres is a that regex doesn't include slot.

TheRealSyler commented 2 years ago

fixed in 679bc56bc46ae04ad85b63b0b144f3a531f777f5