blade-formatter icon indicating copy to clipboard operation
blade-formatter copied to clipboard

feat: allow pass in component prefix

Open RayGuo-ergou opened this issue 1 year ago • 3 comments

Description

Add a new option componentPrefix for html attr format.

Related Issue

closes #942 closes #944

Motivation and Context

Due to currently only prefix of x- or livewire: treat as custom component and format html attr differently, thus for new libs like flux which uses prefix of flux:. The result of the format will cause a syntex error. e.g. :key="$foo - > bar"

How Has This Been Tested?

Both cli and formatter test cases added.

Screenshots (if appropriate):

RayGuo-ergou avatar Oct 10 '24 04:10 RayGuo-ergou

@RayGuo-ergou Thanks for the PR! I'll review it shortly.

shufo avatar Oct 10 '24 10:10 shufo

Hi @shufo , just friendly pinging to see if you have a chance to review this PR.

RayGuo-ergou avatar Oct 22 '24 02:10 RayGuo-ergou

@RayGuo-ergou Uh sorry, I'm currently silly busy on past week. will make time in this weekend to check your PR will work on every platform.

shufo avatar Oct 22 '24 14:10 shufo

I would like this fix too! I just ran into this issue.

raz-iacob avatar Oct 29 '24 14:10 raz-iacob

Released on https://github.com/shufo/blade-formatter/releases/tag/v1.42.0 :rocket: Thanks!

shufo avatar Dec 22 '24 09:12 shufo

Thank you!

RayGuo-ergou avatar Dec 22 '24 22:12 RayGuo-ergou