るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.053秒)
トップページ > クエリ:-[x] > クエリ:TEXT[x] > クラス:RDoc::Markup[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

検索結果

RDoc::Markup#add_special(pattern, name) -> () (125.0)

pattern で指定した正規表現にマッチする文字列をフォーマットの対象にしま す。

...class WikiHtml < SM::ToHtml
def handle_special_WIKIWORD(special)
"<font color=red>" + special.text + "</font>"
end
end

m = SM::SimpleMarkup.new
m.add_special(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)

h = WikiHtml.new
puts m.convert(input_string, h)

変換時に実際にフォ...