intellectual

VScode html 格式化的时候怎么排除文本,不让文本格式化呢?

  •  
  •   intellectual · Aug 25, 2017 · 3327 views
    This topic created in 3183 days ago, the information mentioned may be changed or developed.

    官方说这样设置可以排除一部分 html 里面的标签不会格式化:

    {
        "html.format.unformatted": "abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var"
        }
    

    如果是不带标签的文本怎么来设置呢?比如#开头的这几行,不想格式化的:

    <div class="focusImg">
                <ul class="slidePic">
                    #set($picnewss = "") 
                    #set($picnewss = $!{manualTool.picnews(11311)})
                    #foreach($picnews in $picnewss)
                    <li>
                        <a href="$!{picnews.target_url}" title="$!{picnews.title}" target="_blank">
                            <img src="$!{picnews.image_url}" alt="$!{picnews.title}" width="368" height="328">
                            <i class="bg"></i>
                            <p>$!{stringTool.substr($picnews.title,40,"...")}</p>
                        </a>
                    </li>
                    #end
                </ul>
                <ul class="hd">
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5579 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 06:52 · PVG 14:52 · LAX 23:52 · JFK 02:52
    ♥ Do have faith in what you're doing.