fix(image): remove braille blank before export

This commit is contained in:
Jan De Dobbeleer 2021-11-15 13:08:01 +01:00 committed by Jan De Dobbeleer
parent d0b2671d80
commit 6eb9a2e492

View file

@ -265,6 +265,7 @@ func (ir *ImageRenderer) cleanContent() {
ir.ansiString = strings.ReplaceAll(ir.ansiString, "\x1b[K", "") ir.ansiString = strings.ReplaceAll(ir.ansiString, "\x1b[K", "")
ir.ansiString = strings.ReplaceAll(ir.ansiString, "\x1b[1F", "") ir.ansiString = strings.ReplaceAll(ir.ansiString, "\x1b[1F", "")
ir.ansiString = strings.ReplaceAll(ir.ansiString, "\x1b8", "") ir.ansiString = strings.ReplaceAll(ir.ansiString, "\x1b8", "")
ir.ansiString = strings.ReplaceAll(ir.ansiString, "\u2800", " ")
// replace rprompt with adding and mark right aligned blocks with a pointer // replace rprompt with adding and mark right aligned blocks with a pointer
ir.ansiString = strings.ReplaceAll(ir.ansiString, rPromptAnsi, fmt.Sprintf("_%s", strings.Repeat(" ", ir.cursorPadding))) ir.ansiString = strings.ReplaceAll(ir.ansiString, rPromptAnsi, fmt.Sprintf("_%s", strings.Repeat(" ", ir.cursorPadding)))
ir.ansiString = strings.ReplaceAll(ir.ansiString, "\x1b[1000C", strings.Repeat(" ", ir.rPromptOffset)) ir.ansiString = strings.ReplaceAll(ir.ansiString, "\x1b[1000C", strings.Repeat(" ", ir.rPromptOffset))