Sha256: 292ad54c476dc4cb1f6ce50aa3831a15c9e67c48e67d562347b0c11766fc3e05
Contents?: true
Size: 709 Bytes
Versions: 9
Compression:
Stored size: 709 Bytes
Contents
# -*- coding: utf-8 -*- # list.rb # # <ol> 順番付きリスト生成 # <%= ol l %> # パラメタ: # l: リスト文字列(\nくぎり) # # <ul> 順番無しリスト # <%= ul l , t %> # パラメタ: # l: リスト文字列(\nくぎり) # # Copyright (c) 2002 abbey <inlet@cello.no-ip.org> # Distributed under the GPL2 or any later version. # def ol( l, t = nil, s = nil ) apply_plugin( %Q[<ol>#{li l}</ol>] ) end def ul( l, t = nil) apply_plugin( %Q[<ul>#{li l}</ul>] ) end def li( text ) list = "" text.each_line do |line| list << ("<li>" + line.chomp + "</li>") end list end # Local Variables: # mode: ruby # indent-tabs-mode: t # tab-width: 3 # ruby-indent-level: 3 # End:
Version data entries
9 entries across 8 versions & 1 rubygems