フォーチュンサモナーズ
«前の日記(2007-03-15) 最新 次の日記(2007-03-18)» 編集

Don'tStopMusic

2003|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|12|
2006|01|02|03|04|05|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|08|09|10|

カテゴリ別 2003年 | 2004年 | 2005年 | 2006年 | 2007年 | 2008年

知り合いサイト: よんだもの / 暴想 / Linuxでやる夫 / 新宿Vipper / 僕だけが幸せになればいいのに。


2007-03-17

_ [Ruby] MarkdownBlueCloth 疑問点 このエントリーを含むブックマーク

BlueCloth は Ruby 用の Markdown ライブラリです。使っていて不思議に思ったのがリストの扱い。番号付となしを続けて記述した場合には以下のように HTML 化されます。

$ ruby -rbluecloth -e 'puts BlueCloth.new(<<_EOL_).to_html
1. first 
2. second
- 3rd
* 4th
+ 5th
_EOL_
'
<ol>
<li>first </li>
<li>second</li>
<li>3rd</li>
<li>4th</li>
<li>5th</li>
</ol>
$ ruby -rubygems -e 'require "bluecloth"; puts BlueCloth.new(<<_EOL_).to_html
* first 
* second
1. 3rd
2. 4th
3. 5th
_EOL_
'
<ul>
<li>first </li>
<li>second</li>
<li>3rd</li>
<li>4th</li>
<li>5th</li>
</ul>

Markdown の仕様なのか BlueCloth の実装依存なのかどちらなのでしょう。

お名前:
E-mail:
コメント:
[]

最近のコメント:

RSS
Creative Commons License
This work is licensed under a Creative Commons License
(note: text only. w/o web design, citations, (re)distributed softwares).