Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 json directive adds unexpected whitespace #476

Merged
merged 2 commits into from
Feb 12, 2022

Conversation

shufo
Copy link
Owner

@shufo shufo commented Feb 12, 2022

  • fix: 🐛 json directive adds unexpected whitespace
  • test: 💍 add test for json directive

Description

This PR fixes @json directive bug that adds unexpected whitespace if quotation used in @json directive is same as outer quotation.

e.g.

<div data-single-quote='@json('string with single quote')'>
</div>

will format into

<div data-single-quote='@json(' string with single quote')'>
</div>

fixed behaviour keeps format even if quotation mark is same.

Related Issue

How Has This Been Tested?

see tests

@shufo shufo merged commit 658d692 into master Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant