class AnyStyle::Feature::Terminal

Public Instance Methods

observe(token, **opts) click to toggle source
   # File lib/anystyle/feature/terminal.rb
 4 def observe(token, **opts)
 5   case token
 6   when /[\.\)\]]["'”„’‚´«‘“`»」』\)\]]?$/,
 7        /,["'”„’‚´«‘“`»」』\)\]]|["'”„’‚´«‘“`»」』\)\]],$/
 8     :strong
 9   when /[:"'”„’‚´«‘“`»」』][,;:\p{Pd}!\?\.]?$/
10     :moderate
11   when /[!\?,;\p{Pd}]["'”„’‚´«‘“`»」』]?$/
12     :weak
13   else
14     :none
15   end
16 end