zealinux

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

  •  
  •   zealinux · Jan 17, 2019 · 4653 views
    This topic created in 2680 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
        1
    dorentus  
       Jan 17, 2019
    <style type="text/css> 少了一个 "
    zealinux
        2
    zealinux  
    OP
       Jan 17, 2019
    @dorentus 我是举个例子。手写忘了第二个双引号。
    jiejiss
        3
    jiejiss  
       Jan 17, 2019 via Android
    你需要多装几个扩展( HTML+CSS+JS 之类的),同时建议检查更新,实在不行就提 issue
    fengyj
        4
    fengyj  
       Jan 17, 2019 via Android
    一楼正解。🤣
    还有实在不行 style 就别设置 type 值。
    zealinux
        5
    zealinux  
    OP
       Jan 18, 2019
    发现这是个已知的 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   ·   Solana   ·   1007 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 22:20 · PVG 06:20 · LAX 15:20 · JFK 18:20
    ♥ Do have faith in what you're doing.