powerpack
powerpack copied to clipboard
Bug found in String#strip_margin
There is a bug in the string#strip_margin methods The example given: "|def abc\n|xyz".strip_margin("|") # same string, not work but " |def abc\n |xyz".strip_margin("|") # => "def abc\nxyz" because in the source code gsub(/^\s+#{margin}/, "") so, either change the example in web document or source code to /^\s*#{margin}/, thank you for your attention.