Skip to content

Enable PostCSS in VUE SFC - #3715

Merged
azz merged 3 commits into
prettier:masterfrom
DanielHeckrath:master
Jan 12, 2018
Merged

azz merged 3 commits into
prettier:masterfrom
DanielHeckrath:master

Conversation

@DanielHeckrath

Copy link
Copy Markdown
Contributor

This PR enables the css parser for style blocks that have the lang attribute set to postcss

Comment thread src/language-vue/embed.js Outdated
parser = "scss";
} else if (langAttr.value === "less") {
parser = "less";
} else if (langAttr.value === "postcss") {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move this to above?

if (!langAttr || langAttr.value === "postcss") {

@azz azz left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, would you be able to add a test for this though? (CONTRIBUTING.md)

@DanielHeckrath

Copy link
Copy Markdown
Contributor Author

@azz I've added a style block that verifies that the css parser is used on style blocks with lang="postcss" to the multiparser_vue. Not sure if that is the correct location for that test.

@azz
azz merged commit 2155465 into prettier:master Jan 12, 2018
@azz

azz commented Jan 12, 2018

Copy link
Copy Markdown
Member

Thanks!

@azz azz added this to the 1.10.3 milestone Jan 12, 2018
@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 18, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants