From cc05efa4b89437b5dfd85d596346a771dee8d655 Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Sat, 19 Nov 2022 10:39:52 -0500 Subject: [PATCH] fix: indentation problem within code blocks --- internal/model/model.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/model/model.go b/internal/model/model.go index 33e2512..51dc415 100644 --- a/internal/model/model.go +++ b/internal/model/model.go @@ -26,6 +26,7 @@ import ( var ( //go:embed tutorial.md slidesTutorial []byte + tabSpaces = strings.Repeat(" ", 4) ) const ( @@ -205,6 +206,7 @@ func (m Model) View() string { slide := m.Slides[m.Page] slide = code.HideComments(slide) slide, err := r.Render(slide) + slide = strings.ReplaceAll(slide, "\t", tabSpaces) slide += m.VirtualText if err != nil { slide = fmt.Sprintf("Error: Could not render markdown! (%v)", err)