How can i auto align html in “Edit as HTML” in Google Chrome Dev Tools
Reported by
osemk...@gmail.com,
Sep 27 2017
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 Steps to reproduce the problem: 1. Open dev tools 2. Select any html tag (for example div) 3. Right-click on it and select Edit as HTML What is the expected behavior? Should open editor like it is now, but code should be properly formatted. What went wrong? Code in HTML editor is messy and hard to examine, tags are wrong aligned and if i want to add a tag (for example div) to wrap elements ant test it it is hard to track which tag ends where and so on. Did this work before? No Chrome version: 61.0.3163.91 Channel: stable OS Version: all versions Flash Version: Stack Overflow question which i have created about it : https://stackoverflow.com/questions/46446393/how-can-i-auto-align-html-in-edit-as-html-in-google-chrome-dev-tools?noredirect=1#comment79848863_46446393
,
Oct 2 2017
This is because we parse the HTML and map it to the raw innerHTML of the element. This means that if the element was created or sent with strange formatting it'll preserve that formatting. In your case it may look like it's not working as expected, but if the user set the innerHTML to some strange stuff and we formatted it for them, they may feel like it was not working as expected. I am going to mark as wont-fix since this is intended behavior. |
||
►
Sign in to add a comment |
||
Comment 1 by ligim...@chromium.org
, Sep 28 2017