格式化HTML源代码 - 是否有实用程序? [英] Formatting HTML Source - Is there a utility?

查看:72
本文介绍了格式化HTML源代码 - 是否有实用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是独家新闻:


有没有人还记得UNIX实用程序漂亮用于格式化C代码?


我正在寻找的是一个实用程序,可以做两件事:

1)格式化HTML代码本身它更具可读性(缩进,行

休息等)

2)优化HTML以删除空和冗余标签


原因:你有没有看到当你将WORD

(或其他富文本)粘贴到像Front Page这样的HTML编辑器中时会出现什么样的混乱?答案是你好,

World。大约50KB ...


认识到这两个要求有些矛盾,我可能需要两个实用工具......有没有任何免费工具可用我自己做的是

PERL?


--Maarten(我们****************** @ city.richmond.bc.ca

Here''s the scoop:

Does anyone remember the UNIX utility "pretty" for formatting C code?

What I''m looking for is a utility that will do two things:
1) Format the HTML code itself to make it more readable (indentation, line
breaks, etc.)
2) Optimize HTML to remove empty and redundant tags

Reason: Have you ever seen what kind of a mess you get when you paste WORD
(or other rich text) into a HTML editor like Front Page? Answer is a "Hello,
World" of about 50KB...

Recognising that the two requirements are somewhat contradictory, I may need
two utilities...are there any free ones available before I do it myself in
PERL?

--Maarten ( we******************@city.richmond.bc.ca )

推荐答案

只是对PDF说NO:写道:
just say NO to PDF wrote:
这里是独家新闻:

有没有人记得UNIX实用程序漂亮用于格式化C代码?
Here''s the scoop:

Does anyone remember the UNIX utility "pretty" for formatting C code?



http://www.w3.org/People/Raggett/tidy/


John


-

email:mail(at)johnbokma.com(或回复)主页: http:// johnbokma .com /

用户界面设计提示: http:// johnbokma.com/websitedesign/ ~ICQ 218175426

@%68%65%6C%6C%6F%2C%20%4E%6F%72%74%6F %6E%21



http://www.w3.org/People/Raggett/tidy/

John

--
email: mail(at)johnbokma.com (or reply) home: http://johnbokma.com/
UI design tips: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

@%68%65%6C%6C%6F%2C%20%4E%6F%72%74%6F%6E%21




只对PDF说NO < stingray_67@no_spam.hotmail.com>在消息中写道

新闻:XK ************** @ news.bc.tac.net ...

"just say NO to PDF" <stingray_67@no_spam.hotmail.com> wrote in message
news:XK**************@news.bc.tac.net...
这里''独家新闻:

有人还记得UNIX实用程序漂亮吗?用于格式化C代码?

我正在寻找的是一个可以做两件事的实用程序:
1)格式化HTML代码本身以使其更具可读性(缩进,行
休息等)2)优化HTML以删除空的和冗余的标签

原因:你有没有看到当你粘贴WORD时会得到什么样的混乱(或其他富文本)进入像Front Page这样的HTML编辑器?答案是
Hello,World大约50KB ...

认识到这两个要求有点矛盾,我可能需要两个实用工具......在我自己做之前是否有免费的实用工具
PERL?

- Maarten(我们****************** @ city.richmond.bc.ca
Here''s the scoop:

Does anyone remember the UNIX utility "pretty" for formatting C code?

What I''m looking for is a utility that will do two things:
1) Format the HTML code itself to make it more readable (indentation, line
breaks, etc.)
2) Optimize HTML to remove empty and redundant tags

Reason: Have you ever seen what kind of a mess you get when you paste WORD
(or other rich text) into a HTML editor like Front Page? Answer is a "Hello, World" of about 50KB...

Recognising that the two requirements are somewhat contradictory, I may need two utilities...are there any free ones available before I do it myself in
PERL?

--Maarten ( we******************@city.richmond.bc.ca )




试用HTML-Kit

http:// www.chami.com/html-kit/


2003年7月17日星期四13:29:31 -0700,只需对PDF写道:
On Thu, 17 Jul 2003 13:29:31 -0700, just say NO to PDF wrote:
我正在寻找的是一个可以做两件事的实用程序:
1)格式化HTML代码本身以使其更具可读性(缩进,行
休息等。)2)优化HTML以删除空和冗余标签


Tidy完成这两项工作。有人已经发布了旧Tidy

网站的链接,但最新版本可以在 http://tidy.sourceforge.net/

原因:你有没有看到粘贴WORD时会得到什么样的混乱
(或者其他富文本)进入像Front Page这样的HTML编辑器?答案是Hello,
World。大约50KB ...
What I''m looking for is a utility that will do two things:
1) Format the HTML code itself to make it more readable (indentation, line
breaks, etc.)
2) Optimize HTML to remove empty and redundant tags
Tidy does both of these. Someone has already posted a link to the old Tidy
site, but the newest versions can be found at http://tidy.sourceforge.net/
Reason: Have you ever seen what kind of a mess you get when you paste WORD
(or other rich text) into a HTML editor like Front Page? Answer is a "Hello,
World" of about 50KB...




Tidy有处理FrontPage,Word,

等输出的特殊例程...


-

Toby A Inkster BSc(荣誉)ARCS | mailto:到***** @ goddamn.co.uk | pgp:0x6A2A7D39

目标:inka80 | icq:6622880 |雅虎:tobyink | jabber:ta*@jabber.linux.it
http:// www .goddamn.co.uk / tobyink / | 你有垃圾邮件!

播放://(没有)



Tidy has special routines for dealing with the output of FrontPage, Word,
etc...

--
Toby A Inkster BSc (Hons) ARCS | mailto:to*****@goddamn.co.uk | pgp:0x6A2A7D39
aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:ta*@jabber.linux.it
http://www.goddamn.co.uk/tobyink/ | "You''ve got spam!"
playing://(nothing)


这篇关于格式化HTML源代码 - 是否有实用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆