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:
- 1282 Bytes
1 | require 'chunks/chunk' |
2 | |
3 | # These are basic chunks that have a pattern and can be protected. |
4 | # They are used by rendering process to prevent wiki rendering |
5 | # occuring within literal areas such as <code> and <pre> blocks |
6 | # and within HTML tags. |
7 | module Literal |
8 | |
9 | class AbstractLiteral < Chunk::Abstract |
10 | |
11 | def initialize(match_data, content) |
12 | super |
13 | @unmask_text = @text |
14 | end |
15 | |
16 | end |
17 | |
18 | # A literal chunk that protects 'code' and 'pre' tags from wiki rendering. |
19 | class Pre < AbstractLiteral |
20 | PRE_BLOCKS = "a|pre|code|math" |
21 | PRE_PATTERN = Regexp.new('<('+PRE_BLOCKS+')\b[^>]*?>.*?</\1>', Regexp::MULTILINE) |
22 | def self.pattern() PRE_PATTERN end |
23 | end |
24 | |
25 | # A literal chunk that protects HTML tags from wiki rendering. |
26 | class Tags < AbstractLiteral |
27 | TAGS_PATTERN = Regexp.new('</?[-a-zA-Z:]+\b[^>]*?>', Regexp::MULTILINE) |
28 | def self.pattern() TAGS_PATTERN end |
29 | end |
30 | |
31 | # A literal chunk that protects equations from wiki rendering. |
32 | class Math < AbstractLiteral |
33 | MATH_START = '(\${1,2}|' + Regexp.escape('\[') + '|\\begin\{equation\})' |
34 | MATH_END = '(\${1,2}|' + Regexp.escape('\]') + '|\\end\{equation\})' |
35 | MATH_PATTERN = Regexp.new(MATH_START + '([^$]|\\\$)+?' + MATH_END, Regexp::MULTILINE) |
36 | def self.pattern() MATH_PATTERN end |
37 | end |
38 | |
39 | end |