File: list.rb

package info (click to toggle)
tdiary 2.2.1%2Bdfsg1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 14,044 kB
  • ctags: 2,796
  • sloc: ruby: 32,562; lisp: 514; makefile: 83; sh: 72; sql: 40
file content (32 lines) | stat: -rw-r--r-- 542 bytes parent folder | download | duplicates (2)
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
# list.rb $Revision: 1.4 $
#
# <ol> դꥹ
#   <%= ol l %>
#   ѥ᥿:
#     l: ꥹʸ(\n)
#
# <ul> ̵ꥹ
#   <%= ul l , t %>
#   ѥ᥿:
#     l: ꥹʸ(\n)
#
# Copyright (c) 2002 abbey <inlet@cello.no-ip.org>
# Distributed under the GPL.
#

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