Method: ConverterBase#sesame
- Defined in:
- lib/converterbase.rb
#sesame(str) ⇒ Object
873 874 875 876 877 878 879 880 881 882 883 884 885 886 |
# File 'lib/converterbase.rb', line 873 def sesame(str) if str.include?("|") str.sub("|", "[#傍点]") + "[#傍点終わり]" else str.sub(/([#{CHARACTER_OF_RUBY} ]+)$/) { match_target = $1 if match_target =~ /^( +)/ "#{$1}[#傍点]#{match_target[$1.length..-1]}" else "[#傍点]#{match_target}" end } + "[#傍点終わり]" end end |