Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent Pycharm from formatting a line of HTML code

I have a single line of HTML code in Pycharm

<textarea name="message" placeholder="Message"><t t-esc="message"/></textarea>

This is processed in Odoo with lxml. But I don't want that Pycharm reformats the code thus:

<textarea name="message" placeholder="Message">
    <t t-esc="message"/>
</textarea>

because I get extra spaces around the text. Is there a way to tell Pycharm not to reformat this specific line?

like image 205
macdelacruz Avatar asked Mar 15 '23 10:03

macdelacruz


1 Answers

So as mentioned here, I used:

<!--@formatter:off-->
<!-- Some code -->
<!--@formatter:on-->

But I had to turn on formatter markers in Settings > Editor > Code Style

Thanks Jainik Patel.

like image 194
macdelacruz Avatar answered Mar 24 '23 08:03

macdelacruz