AoBane 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/AoBane/utilities.rb +13 -7
- data/lib/AoBane/version.rb +1 -1
- data/lib/AoBane.rb +3 -3
- metadata +1 -1
data/lib/AoBane/utilities.rb
CHANGED
@@ -17,8 +17,9 @@ $MAX_H = 6
|
|
17
17
|
|
18
18
|
###paling proccessing##########################################################
|
19
19
|
$startDivMark =
|
20
|
-
'\|\-:b=(\d+?)\s(\w+?\s\w+?\s)(w=(\w+?)\s){0,1}(h=(\w+?)\s){0,1}(bg=(\w+?)\s){0,1}' +
|
21
|
-
'
|
20
|
+
'\|\-:b=(\d+?)\s(\w+?\s\w+?\s)(w=(\w+?)\s){0,1}(h=(\w+?)\s){0,1}(bg=((#){0,1}\w+?)\s){0,1}' +
|
21
|
+
'(lh=(\w+?)\s){0,1}' +
|
22
|
+
'rad=(\d+?)\-+\|'
|
22
23
|
$endDivMark = '\|\-+\|'
|
23
24
|
|
24
25
|
def prePaling(text)
|
@@ -30,9 +31,13 @@ def prePaling(text)
|
|
30
31
|
if /#{$endDivMark}/ =~ output[index] then
|
31
32
|
break
|
32
33
|
elsif /^\|(\#{1,6})\s*(.*)\|/ =~ output[index] then
|
33
|
-
output[index] = '#'*$1.size + $2
|
34
|
+
output[index] = '#'*$1.size + $2 #pass through to BlueFeather
|
35
|
+
elsif /^(\s*)\*(\s.+?)/ =~ output[index] then
|
36
|
+
output[index] = $1 + '*' + $2 #pass through to BlueFeather
|
37
|
+
elsif /^(\s*)\-(\s.+?)/ =~ output[index] then
|
38
|
+
output[index] = $1 + '*' + $2 #pass through to BlueFeather
|
34
39
|
elsif /^\|(.*)\s*\|/ =~ output[index] then
|
35
|
-
output[index] =
|
40
|
+
output[index] = $1
|
36
41
|
end
|
37
42
|
end
|
38
43
|
end #if
|
@@ -52,12 +57,13 @@ def postPaling(text)
|
|
52
57
|
output = text.split("\n")
|
53
58
|
output.each_with_index{|line,index|
|
54
59
|
if /#{$startDivMark}/ =~ line then
|
55
|
-
output[index] = '<div style="
|
60
|
+
output[index] = '<div style="border:' + $1 + 'px ' + $2 + ';' +
|
56
61
|
if $4.nil? then '' else 'width:' + if Utilities::isDigit($4) then $4 + 'px;' else $4 + ';' end end +
|
57
62
|
if $6.nil? then '' else 'height:' + if Utilities::isDigit($6) then $6 + 'px;' else $6 + ';' end end +
|
58
|
-
if $8.nil? then '' else 'background-color:' + $8 + ';' end +
|
63
|
+
if $8.nil? then '' else 'background-color:' + $8 + ';' end +
|
64
|
+
if $11.nil? then 'line-height:50%;' else 'line-height:' + $11 + ';' end +
|
59
65
|
'border-radius:' +
|
60
|
-
if $
|
66
|
+
if $12.nil? then '' else $12 end + 'px;">'
|
61
67
|
loop do
|
62
68
|
index += 1
|
63
69
|
if /#{$endDivMark}/ =~ output[index] then
|
data/lib/AoBane/version.rb
CHANGED
data/lib/AoBane.rb
CHANGED
@@ -51,9 +51,9 @@ require 'AoBane/utilities'
|
|
51
51
|
require 'math_ml/string'
|
52
52
|
|
53
53
|
module AoBane
|
54
|
-
VERSION = '0.1.
|
55
|
-
VERSION_NUMBER = 0.
|
56
|
-
RELEASE_DATE = '2013-04-
|
54
|
+
VERSION = '0.1.9'
|
55
|
+
VERSION_NUMBER = 0.0109
|
56
|
+
RELEASE_DATE = '2013-04-19'
|
57
57
|
VERSION_LABEL = "#{VERSION} (#{RELEASE_DATE})"
|
58
58
|
|
59
59
|
UTF8_BOM = "\xef\xbb\xbf"
|