AoBane 0.1.7 → 0.1.8
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/version.rb +1 -1
- data/lib/AoBane.rb +61 -45
- metadata +2 -2
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.8'
|
55
|
+
VERSION_NUMBER = 0.0108
|
56
|
+
RELEASE_DATE = '2013-04-18'
|
57
57
|
VERSION_LABEL = "#{VERSION} (#{RELEASE_DATE})"
|
58
58
|
|
59
59
|
UTF8_BOM = "\xef\xbb\xbf"
|
@@ -659,50 +659,66 @@ module AoBane
|
|
659
659
|
text = Utilities::postPaling(text)
|
660
660
|
|
661
661
|
#Insert by set.minami 2013-03-30
|
662
|
-
output = text.split("\n")
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
"\(c\)" => "©",
|
695
|
-
"\(R\)" =>"®",
|
696
|
-
"\(SS\)" => "§",
|
697
|
-
"\(TM\)" => "™",
|
698
|
-
"!in" => "∉")
|
699
|
-
end
|
700
|
-
end
|
701
|
-
}
|
662
|
+
#output = text.split("\n")
|
663
|
+
specialChar = {
|
664
|
+
"\-\-" => "—",
|
665
|
+
"<=" => "⇔",
|
666
|
+
"<\->" => "↔",
|
667
|
+
"\->" =>"→",
|
668
|
+
"<\-" =>"←",
|
669
|
+
"=>" => "⇒",
|
670
|
+
"<=" => "⇐",
|
671
|
+
"\|\|\^" => "⇑",
|
672
|
+
"\|\|\/" => "⇓",
|
673
|
+
"\|\/" => "↓",
|
674
|
+
"\|\^" => "↑",
|
675
|
+
">>" => "»",
|
676
|
+
"\<\<" => "«",
|
677
|
+
"+_" => "±",
|
678
|
+
"!=" => "≠",
|
679
|
+
"~~" => "≈",
|
680
|
+
"~=" => "≅",
|
681
|
+
"<_" => "≤",
|
682
|
+
">_" => "&ge",
|
683
|
+
"\|FA" => "∀",
|
684
|
+
"\|EX" => "∃",
|
685
|
+
"\|=" => "≡",
|
686
|
+
"\(+\)" => "&oplus",
|
687
|
+
"\(x\)" => "⊗",
|
688
|
+
"\\&" =>"&",
|
689
|
+
"\(c\)" => "©",
|
690
|
+
"\(R\)" =>"®",
|
691
|
+
"\(SS\)" => "§",
|
692
|
+
"\(TM\)" => "™",
|
693
|
+
"!in" => "∉"}
|
702
694
|
|
703
|
-
|
695
|
+
entry = '\-\-|<=>|<\->|\->|<\-|=>|<=|\|\^|\|\|\/|\|\/|\^|\>\>|\<\<|\+_|!=|~~|~=|>_|<_|\|FA|\|EX|\|=|\(+\)|\(x\)|\\&|\(c\)|\(R\)|\(SS\)|\(TM\)|!in'
|
696
|
+
|
697
|
+
if text =~ /<pre>/ then
|
698
|
+
text.gsub!(/<\/pre>(.*?)<pre>/i){|m|
|
699
|
+
if m.nil? then '<\/pre><pre>'
|
700
|
+
else
|
701
|
+
'<\/pre>' + m.gsub!(/#{entry}/,specialChar).to_s + '<pre>'
|
702
|
+
end
|
703
|
+
}
|
704
|
+
text.gsub!(/<\/pre>(.*?)/i){|m|
|
705
|
+
if m.nil? then '<\/pre>'
|
706
|
+
else
|
707
|
+
'</pre>' + m.gsub!(/#{entry}/,specialChar).to_s
|
708
|
+
end
|
709
|
+
}
|
710
|
+
text.gsub!(/(.*?)<pre>/i){|m|
|
711
|
+
if m.nil? then '<pre>'
|
712
|
+
else
|
713
|
+
m.gsub!(/#{entry}/,specialChar).to_s + '<pre>'
|
714
|
+
end
|
715
|
+
}
|
716
|
+
else
|
717
|
+
text.gsub!(/#{entry}/,specialChar)
|
718
|
+
end
|
719
|
+
#return output.join("\n")
|
704
720
|
#Insert by set.minami
|
705
|
-
|
721
|
+
return text
|
706
722
|
|
707
723
|
end
|
708
724
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: AoBane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: math_ml
|