Modify new bytes.ContainsRune to backward compatible bytes.IndexRune

This commit is contained in:
Herkermer Sherwood 2016-12-15 14:49:10 -08:00
parent 37ab263305
commit f3dd3ed758

View File

@ -207,7 +207,7 @@ func (p *printer) literalType(lit *ast.LiteralType) []byte {
case token.STRING:
// If this is a multiline string, poison lines 2+ so we don't
// indent them.
if bytes.ContainsRune(result, '\n') {
if bytes.IndexRune(result, '\n') >= 0 {
result = p.heredocIndent(result)
}
}