Sha256: 420661bb0af8b731f975aaed64de0aadefe02121b67ed16a7ee760cf13b9a4e0

Contents?: true

Size: 264 Bytes

Versions: 4

Compression:

Stored size: 264 Bytes

Contents

require 'wparser/parse'

module Inlines
  class Deleted < Parse
    def self.parse line
      @result = line.gsub!(/(?:(?!\\-)(^|.)-)(.+?)(?:(?!\\-)(.)-)/){|s|
        "#$1<S>#$2#$3</S>"
      }
      @result = line.gsub!(/\\-/, '-')
      super
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wparser-0.1.3 lib/wparser/inline/deleted.rb
wparser-0.1.2 lib/wparser/inline/deleted.rb
wparser-0.1.1 lib/wparser/inline/deleted.rb
wparser-0.1.0 lib/wparser/inline/deleted.rb