Merge pull request #176 from theherk/feature/build-on-Go-before-1.7

Modify new bytes.ContainsRune to backward compatible bytes.IndexRune
This commit is contained in:
Mitchell Hashimoto 2016-12-15 14:58:39 -08:00 committed by GitHub
commit 80e628d796

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)
}
}