beautifier/js-beautify

Beautification problem with JS Single Line Comment <!--

Open

#1,835 建立於 2020年8月31日

在 GitHub 查看
 (10 留言) (0 反應) (1 負責人)JavaScript (1,460 fork)batch import
good first issuelanguage: javascripttype: bug

倉庫指標

Star
 (8,342 star)
PR 合併指標
 (平均合併 51天 1小時) (30 天內合併 16 個 PR)

描述

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

貢獻者指南