4

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?

3

1 Answer 1

9

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.