Open Bug 1575143 Opened 7 years ago Updated 4 years ago

Newlines in HTML comments are not printed in the inspector

Categories

(DevTools :: Inspector, enhancement, P3)

68 Branch
enhancement

Tracking

(Not tracked)

People

(Reporter: martijn.cuppens, Unassigned)

Details

(Keywords: parity-chrome, Whiteboard: [triagemonth-2019-08])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Create a HTML file with a code comment with newlines, eg:

<!--
  Here's a list:
  - First item
  - Second item
-->

Demo: https://jsfiddle.net/83yhsoa2/

Actual results:

Newlines are not shown in the inspector:

<!-- Here's a list: - First item - Second item -->

Expected results:

Newlines should be kept to make the comments more readable (like Chromium does).

Component: Untriaged → Inspector
Product: Firefox → DevTools

Hi Martijn Cuppens
Thanks for taking your time in reporting this issue! I can reproduce your issue on Windows 10 ( 64-bit) machine by following the bellow STR!

  • Crated a HTML file with the given code on the Comment 0 ;
  • Opened the fine with Latest Firefox 68.0.2 .
  • Inspected the issue on Devtools Inspector panel .

Actual results:

The following can be found on Inspector panel :
<!-- Here's a list: - First item - Second item -->

Expected results:
Newlines should be kept to make the comments more readable . Like what can be found on Chrome .

As I can reproduce this issue, hence I am marking this as NEW!

Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [triagemonth-2019-08]

Thanks for filing. This is indeed a chrome-parity bug that we should address.
It seems like we already try to format HTML comments here /devtools/client/inspector/markup/components/TextNode.js by rendering them inside a <pre> element.
I could have sworn we had this at some stage, but maybe not.

Keywords: parity-chrome
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.