riven 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/riven/html_generator.rb +2 -1
- data/lib/riven/markup_file.rb +21 -3
- data/lib/riven/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 041073e77332410b3beec7c6f5e2510020034e95
|
4
|
+
data.tar.gz: 6e39be4418714492d5ca7f2c99c0dd0bd3f11b72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d112db24fac421b1d166f181c7660368931eacfe7e5158c2c61997585c26eff6764626af9e0080ffc6c178e39634e18671b19abd14cf017d26677a3cb6a207a
|
7
|
+
data.tar.gz: 594129231909ba0208df4cf014534660faf61dff2751d5b6eb6b4a480f87f2eb662b56226e3659e7eb741901c9cb1688055062251aee9ebd9aa66afa0a3ee257
|
data/lib/riven/html_generator.rb
CHANGED
@@ -34,6 +34,7 @@ module Riven
|
|
34
34
|
public def markup_to_html(markup)
|
35
35
|
code = Riven::Markup::Code.new
|
36
36
|
|
37
|
+
markup = MarkupFile.remove_escape_sequences(markup)
|
37
38
|
markup = code.extract(markup)
|
38
39
|
|
39
40
|
opts = {
|
@@ -62,4 +63,4 @@ module Riven
|
|
62
63
|
@html_file.delete!
|
63
64
|
end
|
64
65
|
end
|
65
|
-
end
|
66
|
+
end
|
data/lib/riven/markup_file.rb
CHANGED
@@ -41,9 +41,18 @@ module Riven
|
|
41
41
|
loop do
|
42
42
|
non_found = true
|
43
43
|
|
44
|
-
@markup.gsub!(
|
45
|
-
|
46
|
-
|
44
|
+
@markup.gsub!(/(.)?<<\[\s*([^\]\s]+)\s*\]/) do |inc|
|
45
|
+
if $1 == '_'
|
46
|
+
# special secret escape sign, will be removed afterwards.
|
47
|
+
# Required to avoid recursive substitution
|
48
|
+
inc.gsub!('_', '¦')
|
49
|
+
inc
|
50
|
+
elsif $1 == '¦'
|
51
|
+
inc
|
52
|
+
else
|
53
|
+
non_found = false
|
54
|
+
($1 ? $1 : '') + MarkupFile.new(@dirname.to_s + '/' + $2).markup
|
55
|
+
end
|
47
56
|
end
|
48
57
|
|
49
58
|
break if non_found
|
@@ -96,6 +105,15 @@ module Riven
|
|
96
105
|
private def exclude?(except, file)
|
97
106
|
except.select { |f| f != '' && f.path === file.path }.any?
|
98
107
|
end
|
108
|
+
|
109
|
+
|
110
|
+
#
|
111
|
+
# Removes the internal escape sequence
|
112
|
+
#
|
113
|
+
|
114
|
+
public def remove_escape_sequences(markup)
|
115
|
+
markup.gsub('¦', '')
|
116
|
+
end
|
99
117
|
end
|
100
118
|
end
|
101
119
|
end
|
data/lib/riven/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Kammerl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|