Moved Maruku (and its dependencies) and XHTMLDiff (and its dependencies) to vendor/plugins/ .

Synced with Instiki SVN.
master
Jacques Distler 2007-02-10 23:03:15 -06:00
parent 64037c67ac
commit 63e217bcfd
59 changed files with 40 additions and 1 deletions

View File

@ -22,6 +22,7 @@
- updated packaged sqlite3-ruby to 1.2.0
- FEATURES:
- fix: being logged in on more Webs at once works now [Jaques Distler]
- Stylesheet tweaks
- visual display if webs are pass-protected (div background)
- Linux packaging

38
vendor/plugins/syntax/lib/syntax.rb vendored Normal file
View File

@ -0,0 +1,38 @@
require 'syntax/common'
module Syntax
# A default tokenizer for handling syntaxes that are not explicitly handled
# elsewhere. It simply yields the given text as a single token.
class Default
# Yield the given text as a single token.
def tokenize( text )
yield Token.new( text, :normal )
end
end
# A hash for registering syntax implementations.
SYNTAX = Hash.new( Default )
# Load the implementation of the requested syntax. If the syntax cannot be
# found, or if it cannot be loaded for whatever reason, the Default syntax
# handler will be returned.
def load( syntax )
begin
require "syntax/lang/#{syntax}"
rescue LoadError
end
SYNTAX[ syntax ].new
end
module_function :load
# Return an array of the names of supported syntaxes.
def all
lang_dir = File.join(File.dirname(__FILE__), "syntax", "lang")
Dir["#{lang_dir}/*.rb"].map { |path| File.basename(path, ".rb") }
end
module_function :all
end

View File

@ -2,7 +2,7 @@
# Author: Aredridel <aredridel@nbtsc.org>
# Website: http://theinternetco.net/projects/ruby/xhtmldiff.html
# Licence: same as Ruby
# Version: 1.22
# Version: 1.2.2
#
# Tweaks by Jacques Distler <distler@golem.ph.utexas.edu>
# -- add classnames to <del> and <ins> elements added by XHTMLDiff,