前の日 / 次の日 / 最新 / 2008-09

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

2008-09-03 Wed

google-code-prettify に言語の追加

prettify.js を直接編集するのではなく、
lang-d.js みたいなのを作るのか。

参照
lang-lisp.js

D言語対応 google-code-prettify

D言語のキーワードを追加してみた。

prettify.js

lang-d での言語の限定もできる。

[2007-04-08-2]

chalow の方も言語を指定できるように変更しておこう。

google-code-prettify は言語を限定して使用できる

class="prettyprint lang-html" を指定すると html に限定する。

"c", "cc", "cpp", "cs", "cyc", "java", "bsh", "csh", "sh",
"cv", "py", "perl", "pl", "pm", "rb", "js",
"html", "html", "xhtml", "xml", "xsl"
が定義されている。

参照
Javascript code prettifier

xhtml での google-code-prettify

google-code-prettify で   を出力しているところがある。

xhtml では   が定義されてない。
xhtml で google-code-prettify を使うと未定義の実態を参照することになる。

            .replace(lastWasSpace
                     ? startOrSpaceRe
                     : adjacentSpaceRe, '$1 ');

のように変更してみた。

Google Chrome で見て動いてないのに気づいた。
「xhtml では &nbsp が定義されてない。」ってのが分からなかった。

Referrer (Inside): [2009-10-15-1]