Haml::Util#balance

Parsed documentation:
View on GitHub
Moves a scanner through a balanced pair of characters.
For example:

    Foo (Bar (Baz bang) bop) (Bang (bop bip))
    ^                       ^
    from                    to

@param scanner [StringScanner] The string scanner to move
@param start [String] The character opening the balanced pair.
@param finish [String] The character closing the balanced pair.
@param count [Fixnum] The number of opening characters matched
  before calling this method
@return [(String, String)] The string matched within the balanced pair
  and the rest of the string.
  `["Foo (Bar (Baz bang) bop)", " (Bang (bop bip))"]` in the example above.
No suggestions.
Please help! Open an issue on GitHub if this assessment is incorrect.