カテゴリ別 2003年 | 2004年 | 2005年 | 2006年 | 2007年 | 2008年
知り合いサイト: よんだもの / 暴想 / Linuxでやる夫 / 新宿Vipper / 僕だけが幸せになればいいのに。
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 の実装依存なのかどちらなのでしょう。
最近のコメント:
RSS
![]()
This work is licensed under a
Creative Commons License
(note: text only. w/o web design, citations, (re)distributed softwares).