Sha256: aeefcbc07f8d5d7c41f0870bf52e85f0f79f2152758b629bfe864e9d8d10855a

Contents?: true

Size: 312 Bytes

Versions: 125

Compression:

Stored size: 312 Bytes

Contents

module Gherkin
  module Formatter
    module Escaping
      # Escapes a pipes and backslashes:
      #
      # * | becomes \|
      # * \ becomes \\
      #
      # This is used in the pretty formatter.
      def escape_cell(s)
        s.gsub(/\|/, "\\|").gsub(/\\(?!\|)/, "\\\\\\\\")
      end
    end
  end
end

Version data entries

125 entries across 125 versions & 2 rubygems

Version Path
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/escaping.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/escaping.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/escaping.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/escaping.rb
gherkin-2.3.1 lib/gherkin/formatter/escaping.rb
gherkin-2.3.1-x86-mswin32 lib/gherkin/formatter/escaping.rb
gherkin-2.3.1-x86-mingw32 lib/gherkin/formatter/escaping.rb
gherkin-2.3.1-universal-dotnet lib/gherkin/formatter/escaping.rb
gherkin-2.3.1-java lib/gherkin/formatter/escaping.rb
gherkin-2.3.0 lib/gherkin/formatter/escaping.rb
gherkin-2.3.0-x86-mswin32 lib/gherkin/formatter/escaping.rb
gherkin-2.3.0-x86-mingw32 lib/gherkin/formatter/escaping.rb
gherkin-2.3.0-universal-dotnet lib/gherkin/formatter/escaping.rb
gherkin-2.3.0-java lib/gherkin/formatter/escaping.rb
gherkin-2.2.9 lib/gherkin/formatter/escaping.rb
gherkin-2.2.9-x86-mswin32 lib/gherkin/formatter/escaping.rb
gherkin-2.2.9-x86-mingw32 lib/gherkin/formatter/escaping.rb
gherkin-2.2.9-universal-dotnet lib/gherkin/formatter/escaping.rb
gherkin-2.2.9-java lib/gherkin/formatter/escaping.rb
gherkin-2.2.8 lib/gherkin/formatter/escaping.rb