module Cucumber::Gherkin::Formatter::Escaping
Public Instance Methods
Source
# File lib/cucumber/gherkin/formatter/escaping.rb, line 13 def escape_cell(sym) sym.gsub(/\\(?!\|)/, '\\\\\\\\').gsub(/\n/, '\\n').gsub(/\|/, '\\|') end
Escapes a pipes and backslashes:
-
| becomes |
-
\ becomes \
This is used in the pretty formatter.