func WrapLinePreserve(line string, length int) []string {
	// if the line is short enough return it as is
	if len(line) < length {
		return []string{line}
	}

	// split off the leading whitespace
	split := wsRegex.FindStringSubmatch(line)
	prefix := split[1]

	// wrap the lines and append the prefix everywhere
	lines := WrapLine(split[2], length-len(prefix))
	for i := range lines {
		lines[i] = prefix + lines[i]
	}
	return lines
}
// WrapLinePreserve wraps a single line at length
// preserving leading whitespace in all resulting lines
WrapLinePreserve wraps a single line at length
preserving leading whitespace in all resulting lines
// WrapLinePreserve wraps a single line at length // preserving leading whitespace in all resulting lines
func WrapLinePreserve(line string, length int) []string {
	if len(line) < length {
		return []string{line}
	}
	split := wsRegex.FindStringSubmatch(line)
	prefix := split[1]
	lines := WrapLine(split[2], length-len(prefix))
	for i := range lines {
		lines[i] = prefix + lines[i]
	}
	return lines
}
func WrapLinePreserve ( line string , length int ) [ ] string { if len ( line ) < length { return [ ] string { line } } split := wsRegex . FindStringSubmatch ( line ) prefix := split [ 1 ] lines := WrapLine ( split [ 2 ] , length - len ( prefix ) ) for i := range lines { lines [ i ] = prefix + lines [ i ] } return lines }
WrapLinePreserve wraps a single line at length
preserving leading whitespace in all resulting lines
WrapLinePreserve wraps a single line at length preserving leading whitespace in all resulting lines
// if the line is short enough return it as is // split off the leading whitespace // wrap the lines and append the prefix everywhere