File: list.rb

package info (click to toggle)
tdiary 2.0.1-1sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,220 kB
  • ctags: 1,667
  • sloc: ruby: 20,044; lisp: 476; makefile: 91; sql: 32; sh: 31
file content (36 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# list.rb $Revision: 1.3 $
#
# <ol> դꥹ
#   <%= ol l %>
#   ѥ᥿:
#     l: ꥹʸ(\n)
#
# <ul> ̵ꥹ
#   <%= ul l , t %>
#   ѥ᥿:
#     l: ꥹʸ(\n)
#
# Copyright (c) 2002 abbey <inlet@cello.no-ip.org>
# Distributed under the GPL.
#
=begin ChangeLog
2002-12-18 TADA Tadashi <sho@spc.gr.jp>
	* remove parameter of t and s (for HTML Strict).
=end

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 do |line|
		list << ("<li>" + line.chomp + "</li>")
	end
	result = list
end