开发者

HTML Formatter - with this specific format

开发者 https://www.devze.com 2023-03-17 02:07 出处:网络
I know there\'re a lot of HTML formatter. I\'ve tried tons but none fit my requirement. Please suggest if u met something that can:

I know there're a lot of HTML formatter. I've tried tons but none fit my requirement. Please suggest if u met something that can:

1) Convert

    <div><%=request.getAttribute("NAV")%><div>
    BB<span>CC<input type="text" value="123开发者_运维知识库"></span></div></div>

Into

    <div><%=request.getAttribute("NAV")%>
        <div>BB
            <span>CC
                <input type="text" value="123">
            </span>
        </div>
    </div>

2) Preserve all symbols

    (/>'/ wont be converted to /&gt;')
    (space wont be converted to &nbsp)
    (&nbsp wont be converted to space)

3) Wont make

    <input type="text" value="123">

Into

    <input type="text"
    value="123">

What the tools only need to do is to new line every new <xxx and add indent for each <xxx & /xxx> nest.


HTML formatters have a habit of stripping php/ruby code and template tags, so make sure that before validating, that your HTML is 100% HTML.

I know a HTML formatter that will

  • Convert
  • Preserve all symbols
  • Not make unnecessary line breaks

http://dirtymarkup.com

Review the HTML code for abnormalities before replacing your existing HTML with it.

0

精彩评论

暂无评论...
验证码 换一张
取 消