Skip to content

Prevent Line-breaks in ternary operators in Beautifier #1924

Answered by Ivan-devprat
Ivan-devprat asked this question in Q&A
Discussion options

You must be logged in to vote

So, I think I found the problem.
Simply put, Prettier doesn't work well with mixed php/html files. Hence, this issue that appear when I do inline PHP.

To quote Prettier:

We're considering the plugin to be stable when pure PHP files are formatted. Formatting of files that contain mixed PHP and HTML is still considered unstable - please see open issues with the tag "inline" for details.

Beautify should then be used with care while editing mixed HTML/PHP files.

Thanks to @abose for helping with this !

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Ivan-devprat
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Ivan-devprat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants