indent list lines

This commit is contained in:
Dan Anglin 2024-07-07 22:46:40 +01:00
parent f8300a1771
commit 527fd069df
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638

View file

@ -25,7 +25,13 @@ func (p Printer) wrapLines(text string, nIndent int) string {
var builder strings.Builder
for i, line := range lines {
builder.WriteString(wrapLine(line, separator, p.lineWrapCharacterLimit - nIndent))
extraIndent := ""
if strings.HasPrefix(line, symbolBullet) {
extraIndent = " "
}
builder.WriteString(wrapLine(line, separator+extraIndent, p.lineWrapCharacterLimit-nIndent))
if i < len(lines)-1 {
builder.WriteString(separator)