zealinux

vs code 注释 html 文件中的<style>代码出错

  •  
  •   zealinux · Jan 17, 2019 · 5089 views
    This topic created in 2873 days ago, the information mentioned may be changed or developed.

    比如:

    <style type="text/css>
      span.box {
        <!-- position: fixed; -->  // 注释就成这鬼样子
      }
    </style>
    

    另外注释 html 文件中的<script>也会出错(错误的使用了 html 的注释)</p> <p>需要怎么样 hack ?</p> </script>

    5 replies  •  2019-01-18 10:11:42 +08:00
    dorentus
    dorentus
    Jan 17, 2019
    1
    <style type="text/css> 少了一个 "
    zealinux
    zealinux
    OP
    Jan 17, 2019
    2
    @dorentus 我是举个例子。手写忘了第二个双引号。
    jiejiss
    jiejiss
    Jan 17, 2019 via Android
    3
    你需要多装几个扩展( HTML+CSS+JS 之类的),同时建议检查更新,实在不行就提 issue
    fengyj
    fengyj
    Jan 17, 2019 via Android
    4
    一楼正解。🤣
    还有实在不行 style 就别设置 type 值。
    zealinux
    zealinux
    OP
    Jan 18, 2019
    5
    发现这是个已知的 vscode 问题


    [HTML comment inside a script tag in HTML · Issue #59313 · Microsoft/vscode]( https://github.com/Microsoft/vscode/issues/59313)

    [[html] problems with html style comments in embedded code · Issue #47448 · Microsoft/vscode]( https://github.com/Microsoft/vscode/issues/47448)

    官方一直还没有解决
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1904 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 09:50 · PVG 17:50 · LAX 01:50 · JFK 04:50
    ♥ Do have faith in what you're doing.