Pycharm, stop on code refactoring spliting html tags attributes
I use Pycharm for Python and HTML development.
How do I set Pycharm no to split html tags(keep them on a single line), when I use Reformat code in html files that are used as templates(have both python and html inside)
Example:
<a class="lambda-content"
href="{{ item.datacolect_obj.document.url }}"> {{ item.datacolect_obj.filename }}</a>
If there are multiple tags, is ok to split.
I checked, Code style -> HTML, Don't break if inline content, added a, no luck;
if the content, only content is too long, can be split for paragraphs, but not the tag itself.
Please sign in to leave a comment.
In Settings | Editor | Code Style | HTML, set Wrap attributes to Do not wrap - does it help?
no is not working, if I have an image is doing:
<img src="
{% if image_t%}{{ image_t.url }}{% else %}{% static 'img/placeholders/image.png' %}{% endif %}" />
Works for me. Please provide a sample project that shows up the issue plus your settings (File | Export settings)
Is working in pure HTML, or in Django Template HTML ?
As example, the codes above:
Looks similar to https://youtrack.jetbrains.com/issue/PY-25835, please follow it for updates