格式化在网站上呈现的代码/脚本/配置文件 [英] Formatting code/scripts/configuration files rendered on a website

查看:77
本文介绍了格式化在网站上呈现的代码/脚本/配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




因为我很高兴发现如何让我的键盘输入

这样的符号?直接,我做了一个关于它的howto页面:
http://tcl.sfs.uni-tuebingen.de/~hendrik/keyboard.shtml


我试图按照
的建议 http://xhtml.com/en/xhtml/reference/pre/ 不使用< pretag,但是我

对它不满意,因为标签没有保留(见底部

部分)。这不是必不可少的,但会很好。我可以这样做

加上上面链接中给出的CSS吗? (我删除了#

保证金:1px 0;因为我不喜欢它。)


H.

- -

Hendrik Maryns
http ://tcl.sfs.uni-tuebingen.de/~hendrik/

==================
http://aouw.org

提出聪明的问题,得到好的答案:
http://www.catb。 org /~esr / faqs / smart-questions.html

Hi,

Since I was so pleased to discover how to enable my keyboard to type
symbols like a?| directly, I made a howto-page about it:
http://tcl.sfs.uni-tuebingen.de/~hendrik/keyboard.shtml.

I tried to follow the advice from
http://xhtml.com/en/xhtml/reference/pre/ to not use the <pretag, but I
am not satisfied with it, since tabs are not preserved (see bottom
part). This is not essential here, but would be nice. Can I do that
with an addition to the CSS given on the link above? (I removed #
margin: 1px 0; since I dona??t like it.)

H.
--
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

推荐答案

Hendrik Maryns schreef:
Hendrik Maryns schreef:




因为我很高兴发现如何让键盘输入

这样的符号?直接,我做了一个关于它的howto页面:
http://tcl.sfs.uni-tuebingen.de/~hendrik/keyboard.shtml


我试图按照
的建议 http://xhtml.com/en/xhtml/reference/pre/ 不使用< pretag,但是我

对它不满意,因为标签没有保留(见底部

部分)。这不是必不可少的,但会很好。我可以这样做

加上上面链接中给出的CSS吗? (我删除了#

保证金:1px 0;因为我不喜欢它。)
Hi,

Since I was so pleased to discover how to enable my keyboard to type
symbols like a?| directly, I made a howto-page about it:
http://tcl.sfs.uni-tuebingen.de/~hendrik/keyboard.shtml.

I tried to follow the advice from
http://xhtml.com/en/xhtml/reference/pre/ to not use the <pretag, but I
am not satisfied with it, since tabs are not preserved (see bottom
part). This is not essential here, but would be nice. Can I do that
with an addition to the CSS given on the link above? (I removed #
margin: 1px 0; since I dona??t like it.)



好​​的,已经发现它,只是添加


white-space:pre;


到ol.code-unnumbered li(注意:* not * to ol.code-unnumbered )。


H.

-

Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/

==================
http ://aouw.org

提出聪明的问题,得到好的答案:
http://www.catb.org/~esr/faqs/smart-questions.html

Ok, found it already, simply add

white-space: pre;

to ol.code-unnumbered li (note: *not* to ol.code-unnumbered).

H.
--
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

< br>

Scripsit Hendrik Maryns:
Scripsit Hendrik Maryns:

我试图按照
的建议 http:// xhtml。 com / en / xhtml / reference / pre / 不使用< pretag,
I tried to follow the advice from
http://xhtml.com/en/xhtml/reference/pre/ to not use the <pretag,



为什么?他们的页面看起来很合理(至少在查看纯文本时,通常的bogosity检查),他们有一个表面上很好的论点

(< precarries no meaning),但是_is_这个xhtml.com是什么?我发现的唯一

信息是一个模糊的电子邮件地址:

"有关xhtml.com的评论,请联系:feedback [at] xhtml.com"


初步预期可信度在-100左右。


这个论点并不是那么好。你用的是什么?如果你有
有空格真正重要的数据,比如Python代码,那么为什么

你会在CSS上__关于获得这个重要_content_

提供的信息?

通常的CSS注意事项暗示< pre>而不是任何CSS结构,

是正确的方法,如果数据_is_真正预格式化纯文本

并保留这是必不可少的。

Why? Their page looks reasonable (at least when viewed text-only, the
usual bogosity check), and they have a superficially good argument
(<precarries no meaning), but what _is_ this xhtml.com? The only
information I found easily is an obfuscated E-mail address:
"For comments about xhtml.com, please contact: feedback [at] xhtml.com"

This gives an initial expectation of credibility around -100.

The argument isn''t really that good. What do you use instead? If you
have data where whitespace really matters, like Python code, then why
would you _rely_ on CSS as regards to getting this important _content_
information delivered?

The usual CSS Caveats imply that <pre>, rather than any CSS constructs,
are the right way to go if the data _is_ really preformatted plain text
and preserving that is essential.


但我对此不满意,因为标签未保留
but I am not satisfied with it, since tabs are not preserved



根据HTML规范,制表位应以某种方式出现_and_

作者不应该依赖于此。使用安全的方式:空格。


-

Jukka K. Korpela(Yucca)
http://www.cs.tut.fi/~jkorpela/

By HTML specifications, tab stops should appear in a certain way _and_
authors should not rely on this. Use the safe way: spaces.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Jukka K. Korpela写道:
Jukka K. Korpela wrote:

Scripsit Hendrik Maryns:
Scripsit Hendrik Maryns:

>我试图遵循
http://xhtml.com/en/xhtml/reference/pre/ 不使用< pretag,
>I tried to follow the advice from
http://xhtml.com/en/xhtml/reference/pre/ to not use the <pretag,



为什么?他们的页面看起来很合理(至少在查看纯文本时,通常的bogosity检查),他们有一个表面上很好的论点

(< precarries no meaning),但是_is_这个xhtml.com是什么?我发现的唯一

信息是一个模糊的电子邮件地址:

"有关xhtml.com的评论,请联系:feedback [at] xhtml.com"


初步预期可信度在-100左右。


Why? Their page looks reasonable (at least when viewed text-only, the
usual bogosity check), and they have a superficially good argument
(<precarries no meaning), but what _is_ this xhtml.com? The only
information I found easily is an obfuscated E-mail address:
"For comments about xhtml.com, please contact: feedback [at] xhtml.com"

This gives an initial expectation of credibility around -100.



您所依据的因素无关紧要

您的可信度评估是否存在?他们对PRE标签价值

的可信度可以通过你个人对munged

电子邮件地址的感受来判断?这就像是说,由于你的虚假调用,你的回复的剩余部分(这是一个很好的

处理)的初始期望值为
可信度为-100%他们的方法

联系信息。

There are no limits to the irrelevance of the factors on which you base
your credibility assessments, are there? Their credibility on the value
of the PRE tag can be judged by your personal feelings about munged
e-mail addresses? That''s like saying that the initial expectation of
credibility of the remainder of your response (which is a great
treatment) is -100% because of your bogus invocation of their approach
to contact information.


这篇关于格式化在网站上呈现的代码/脚本/配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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