beautifier/js-beautify
Vedi su GitHubBeautification problem with JS Single Line Comment <!--
Open
#1835 aperta il 31 ago 2020
good first issuelanguage: javascripttype: bug
Metriche repository
- Star
- (8342 star)
- Metriche merge PR
- (Merge medio 51g 1h) (16 PR mergiate in 30 g)
Descrizione
In Javascript <!-- is treated as a single-line comment just like //.
js-beautify works as expected when the line starts with <!--:
Input:
<!--alert(1)commented
Output:
<!--alert(1)commented
Otherwise it will break the syntax:
Input:
alert(1)<!--commented
Output:
alert(1) < !--commented