indent list lines
This commit is contained in:
parent
f8300a1771
commit
527fd069df
1 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue