shufo / blade-formatter

An opinionated blade template formatter for Laravel that respects readability
https://www.npmjs.com/package/blade-formatter
MIT License
456 stars 25 forks source link

fix: πŸ› unexpected result when attrs are not separated by space #879

Closed shufo closed 1 year ago

shufo commented 1 year ago

Description

When html tag attributes are not separated by space like class=""foo="", formatter will output unexpected result

βœ… Closes: #878

Related Issue

How Has This Been Tested?

see tests

codecov[bot] commented 1 year ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (8b19654) 78.97% compared to head (8be1957) 81.34%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #879 +/- ## ========================================== + Coverage 78.97% 81.34% +2.36% ========================================== Files 16 16 Lines 1731 1731 Branches 411 411 ========================================== + Hits 1367 1408 +41 + Misses 349 309 -40 + Partials 15 14 -1 ``` | [Files](https://app.codecov.io/gh/shufo/blade-formatter/pull/879?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Shuhei+Hayashibara) | Coverage Ξ” | | |---|---|---| | [src/formatter.ts](https://app.codecov.io/gh/shufo/blade-formatter/pull/879?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Shuhei+Hayashibara#diff-c3JjL2Zvcm1hdHRlci50cw==) | `94.01% <ΓΈ> (+3.55%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.