astrale-sharp / typstfmt

Apache License 2.0
253 stars 25 forks source link

Strange behaviour with input with tabs #63

Closed antonWetzel closed 1 year ago

antonWetzel commented 1 year ago

The input

#{
    {
        v(0pt)
        v(0pt)
    }
}

gets formatted to

#{
  {
    v(0pt)
            v(0pt)
  }
}

For every line in the nested expression after the first the leading tabs are not removed. This is only relevant if an user uses the formatter with an unformatted file still with tabs.

astrale-sharp commented 1 year ago

Thanks a lot for your report! I never noticed! I'll investigate this tomorrow or the day after!

astrale-sharp commented 1 year ago

The formatter now simply replaces the tabs with spaces!