Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 344
- Log:
Massive changeset which brings the old, ROOL customised Instiki
version up to date, but without any ROOL customisations in this
latest checked-in version (which is 0.19.1). This is deliberate,
so that it's easy to see the changes made for the ROOL version
in a subsequent changeset. The 'app/views/shared' directory is not
part of Instiki but is kept to maintain the change history with
updated ROOL customisations, some of which involve the same files
in that same directory.
- Author:
- rool
- Date:
- Sat Mar 19 19:52:13 +0000 2011
- Size:
- 989 Bytes
1 | require 'syntax/common' |
2 | |
3 | module Syntax |
4 | |
5 | # A default tokenizer for handling syntaxes that are not explicitly handled |
6 | # elsewhere. It simply yields the given text as a single token. |
7 | class Default |
8 | |
9 | # Yield the given text as a single token. |
10 | def tokenize( text ) |
11 | yield Token.new( text, :normal ) |
12 | end |
13 | |
14 | end |
15 | |
16 | # A hash for registering syntax implementations. |
17 | SYNTAX = Hash.new( Default ) |
18 | |
19 | # Load the implementation of the requested syntax. If the syntax cannot be |
20 | # found, or if it cannot be loaded for whatever reason, the Default syntax |
21 | # handler will be returned. |
22 | def load( syntax ) |
23 | begin |
24 | require "syntax/lang/#{syntax}" |
25 | rescue LoadError |
26 | end |
27 | SYNTAX[ syntax ].new |
28 | end |
29 | module_function :load |
30 | |
31 | # Return an array of the names of supported syntaxes. |
32 | def all |
33 | lang_dir = File.join(File.dirname(__FILE__), "syntax", "lang") |
34 | Dir["#{lang_dir}/*.rb"].map { |path| File.basename(path, ".rb") } |
35 | end |
36 | module_function :all |
37 | |
38 | end |