From 3b9dd03ef9cd3758ecf3e7f0f41d7367a1ab8149 Mon Sep 17 00:00:00 2001 From: Dan Castrillo <126793278+dvrd@users.noreply.github.com> Date: Thu, 29 Jun 2023 15:49:45 -0400 Subject: [PATCH] fix: raw & interpretted strings from (json | yaml) on notes are treated the same (#18) --- pdf.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pdf.go b/pdf.go index d3b8c739339787614468e681d5a35e19c5810c82..5a1cd55d185f3319eb879ff7c2bb5bd425b89875 100644 --- a/pdf.go +++ b/pdf.go @@ -102,7 +102,8 @@ func writeNotes(pdf *gopdf.GoPdf, notes string) { _ = pdf.SetFont("Inter", "", 8) pdf.SetTextColor(0, 0, 0) - notesLines := strings.Split(notes, "\\n") + formattedNotes := strings.ReplaceAll(notes, `\n`, "\n") + notesLines := strings.Split(formattedNotes, "\\n") for i := 0; i < len(notesLines); i++ { _ = pdf.Cell(nil, notesLines[i])