Moved Maruku (and its dependencies) and XHTMLDiff (and its dependencies) to vendor/plugins/ .
Synced with Instiki SVN.
This commit is contained in:
parent
64037c67ac
commit
63e217bcfd
|
@ -22,6 +22,7 @@
|
||||||
- updated packaged sqlite3-ruby to 1.2.0
|
- updated packaged sqlite3-ruby to 1.2.0
|
||||||
|
|
||||||
- FEATURES:
|
- FEATURES:
|
||||||
|
- fix: being logged in on more Webs at once works now [Jaques Distler]
|
||||||
- Stylesheet tweaks
|
- Stylesheet tweaks
|
||||||
- visual display if webs are pass-protected (div background)
|
- visual display if webs are pass-protected (div background)
|
||||||
- Linux packaging
|
- Linux packaging
|
||||||
|
|
38
vendor/plugins/syntax/lib/syntax.rb
vendored
Normal file
38
vendor/plugins/syntax/lib/syntax.rb
vendored
Normal 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
|
|
@ -2,7 +2,7 @@
|
||||||
# Author: Aredridel <aredridel@nbtsc.org>
|
# Author: Aredridel <aredridel@nbtsc.org>
|
||||||
# Website: http://theinternetco.net/projects/ruby/xhtmldiff.html
|
# Website: http://theinternetco.net/projects/ruby/xhtmldiff.html
|
||||||
# Licence: same as Ruby
|
# Licence: same as Ruby
|
||||||
# Version: 1.22
|
# Version: 1.2.2
|
||||||
#
|
#
|
||||||
# Tweaks by Jacques Distler <distler@golem.ph.utexas.edu>
|
# Tweaks by Jacques Distler <distler@golem.ph.utexas.edu>
|
||||||
# -- add classnames to <del> and <ins> elements added by XHTMLDiff,
|
# -- add classnames to <del> and <ins> elements added by XHTMLDiff,
|
Loading…
Reference in a new issue