AoBane 0.1.6 → 0.1.7
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 +47 -53
- 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.7'
|
55
|
+
VERSION_NUMBER = 0.0107
|
56
|
+
RELEASE_DATE = '2013-04-17'
|
57
57
|
VERSION_LABEL = "#{VERSION} (#{RELEASE_DATE})"
|
58
58
|
|
59
59
|
UTF8_BOM = "\xef\xbb\xbf"
|
@@ -659,60 +659,54 @@ module AoBane
|
|
659
659
|
text = Utilities::postPaling(text)
|
660
660
|
|
661
661
|
#Insert by set.minami 2013-03-30
|
662
|
-
output =
|
663
|
-
|
664
|
-
if
|
665
|
-
|
666
|
-
|
667
|
-
until /<\/code><\/pre>/ =~ line
|
668
|
-
output << line
|
669
|
-
next
|
670
|
-
end
|
671
|
-
else
|
672
|
-
line.gsub!(/\-\-|<=>|<\->|\->|<\-|=>|<=|\|\^|\|\|\/|\|\/|\^|
|
662
|
+
output = text.split("\n")
|
663
|
+
output.each_with_index{|line,index|
|
664
|
+
if /<\/pre>(.*?)<pre>|(.*)<pre>|<\/pre>(.*)/i =~ line then
|
665
|
+
if $1.nil? then ''
|
666
|
+
else $1.gsub!(/\-\-|<=>|<\->|\->|<\-|=>|<=|\|\^|\|\|\/|\|\/|\^|
|
673
667
|
\>\>|\<\<|\+_|!=|~~|~=|>_|<_|\|FA|\|EX|\|=|\(+\)|\(x\)|
|
674
668
|
\\&|\(c\)|\(R\)|\(SS\)|\(TM\)|!in/,
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
669
|
+
"\-\-" => "—",
|
670
|
+
"<=" => "⇔",
|
671
|
+
"<\->" => "↔",
|
672
|
+
"\->" =>"→",
|
673
|
+
"<\-" =>"←",
|
674
|
+
"=>" => "⇒",
|
675
|
+
"<=" => "⇐",
|
676
|
+
"\|\|\^" => "⇑",
|
677
|
+
"\|\|\/" => "⇓",
|
678
|
+
"\|\/" => "↓",
|
679
|
+
"\|\^" => "↑",
|
680
|
+
">>" => "»",
|
681
|
+
"\<\<" => "«",
|
682
|
+
"+_" => "±",
|
683
|
+
"!=" => "≠",
|
684
|
+
"~~" => "≈",
|
685
|
+
"~=" => "≅",
|
686
|
+
"<_" => "≤",
|
687
|
+
">_" => "&ge",
|
688
|
+
"\|FA" => "∀",
|
689
|
+
"\|EX" => "∃",
|
690
|
+
"\|=" => "≡",
|
691
|
+
"\(+\)" => "&oplus",
|
692
|
+
"\(x\)" => "⊗",
|
693
|
+
"\\&" =>"&",
|
694
|
+
"\(c\)" => "©",
|
695
|
+
"\(R\)" =>"®",
|
696
|
+
"\(SS\)" => "§",
|
697
|
+
"\(TM\)" => "™",
|
698
|
+
"!in" => "∉")
|
699
|
+
end
|
706
700
|
end
|
707
|
-
|
701
|
+
}
|
708
702
|
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
703
|
+
return output.join("\n")
|
704
|
+
#Insert by set.minami
|
705
|
+
#return text
|
706
|
+
|
707
|
+
end
|
708
|
+
|
709
|
+
alias parse parse_text
|
716
710
|
|
717
711
|
# return values are extended. (mainly for testing)
|
718
712
|
def parse_text_with_render_state(str, rs = nil)
|
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.7
|
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-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: math_ml
|