summaryrefslogtreecommitdiff
path: root/ruwiki/tags/release-0.7/lib/ruwiki/wiki/tokens/abbreviations.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ruwiki/tags/release-0.7/lib/ruwiki/wiki/tokens/abbreviations.rb')
-rw-r--r--ruwiki/tags/release-0.7/lib/ruwiki/wiki/tokens/abbreviations.rb42
1 files changed, 0 insertions, 42 deletions
diff --git a/ruwiki/tags/release-0.7/lib/ruwiki/wiki/tokens/abbreviations.rb b/ruwiki/tags/release-0.7/lib/ruwiki/wiki/tokens/abbreviations.rb
deleted file mode 100644
index 3329fab..0000000
--- a/ruwiki/tags/release-0.7/lib/ruwiki/wiki/tokens/abbreviations.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-#--
-# Ruwiki
-# Copyright © 2002 - 2004, Digikata and HaloStatue
-# Alan Chen (alan@digikata.com)
-# Austin Ziegler (ruwiki@halostatue.ca)
-#
-# Licensed under the same terms as Ruby.
-#
-# $Id$
-#++
-class Ruwiki
- class Wiki
- # Converts abbreviations.
- class Abbreviations < Ruwiki::Wiki::Token
- ABBREVIATIONS = {
- "PM" => "PocoMail"
- }
-
- def self.regexp
- %r!@\{([^\}]*)\}!
- end
-
- def replace
- k = @match.captures[0]
- if k.nil? or k.empty?
- data = "<dl>"
- ABBREVIATIONS.each do |k, v|
- data << "<dt>#{k}</dt><dd>#{v}</dd>"
- end
- data << "</dl>"
- else
- if ABBREVIATIONS.has_key?(k)
- data = ABBREVIATIONS[k]
- else
- data = @match[0]
- end
- end
- data
- end
- end
- end
-end