Skip to content

Commit

Permalink
Upgrade github.com/gomarkdown/markdown version
Browse files Browse the repository at this point in the history
  • Loading branch information
jessp01 committed Dec 18, 2024
1 parent 3104889 commit cfd6d52
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/canhlinh/svg2png v0.0.0-20201124065332-6ba87c82371f
github.com/gabriel-vasile/mimetype v1.4.2
github.com/go-pdf/fpdf v0.9.0
github.com/gomarkdown/markdown v0.0.0-20230922105210-14b16010c2ee
github.com/gomarkdown/markdown v0.0.0-20240729212818-a2a9c4f76ef5
github.com/jessp01/gohighlight v0.21.1-7
golang.org/x/exp v0.0.0-20240707233637-46b078467d37
)
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
github.com/go-pdf/fpdf v0.9.0 h1:PPvSaUuo1iMi9KkaAn90NuKi+P4gwMedWPHhj8YlJQw=
github.com/go-pdf/fpdf v0.9.0/go.mod h1:oO8N111TkmKb9D7VvWGLvLJlaZUQVPM+6V42pp3iV4Y=
github.com/gomarkdown/markdown v0.0.0-20230922105210-14b16010c2ee h1:gvsnG+uIVkOue7HrYAG2ZnOdLoJTqsLyuBFJaU0kX4M=
github.com/gomarkdown/markdown v0.0.0-20230922105210-14b16010c2ee/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA=
github.com/gomarkdown/markdown v0.0.0-20240626202925-2eda941fd024 h1:saBP362Qm7zDdDXqv61kI4rzhmLFq3Z1gx34xpl6cWE=
github.com/gomarkdown/markdown v0.0.0-20240626202925-2eda941fd024/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA=
github.com/gomarkdown/markdown v0.0.0-20240729212818-a2a9c4f76ef5 h1:8QWUW69MXlNdZXnDnD9vEQ1BL8/mm1FTiSesKKHYivk=
github.com/gomarkdown/markdown v0.0.0-20240729212818-a2a9c4f76ef5/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA=
github.com/jessp01/gohighlight v0.21.1-7 h1:u1CurHm8ogal3AFeDMF97pDJ4aPlPdgZg5PL6ULeTb0=
github.com/jessp01/gohighlight v0.21.1-7/go.mod h1:52r0Yxd1+T9f7uLenaO2/34K3gPOejxCxXwdNc/2Z8Y=
github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2 h1:YocNLcTBdEdvY3iDK6jfWXvEaM5OCKkjxPKoJRdB3Gg=
Expand Down
9 changes: 8 additions & 1 deletion nodeProcessing.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ func (r *PdfRenderer) processText(node *ast.Text) {
if r.cs.peek().isHeader {
r.setStyler(currentStyle)
// get the string width of header value
hw := r.Pdf.GetStringWidth(s) + (2 * r.em)
initialWidth := r.Pdf.GetStringWidth(s)
/* if initialWidth == 0 {
initialWidth = 30
}
log.Println(s + ":")
log.Println(initialWidth)*/
hw := initialWidth + (2 * r.em)
// now append it
cellwidths = append(cellwidths, hw)
// now write it...
Expand Down Expand Up @@ -673,6 +679,7 @@ func (r *PdfRenderer) processTableRow(node ast.Node, entering bool) {

func (r *PdfRenderer) processTableCell(node ast.TableCell, entering bool) {
if entering {

r.tracer("TableCell (entering)", "")
x := &containerState{
textStyle: r.Normal, listkind: notlist,
Expand Down

0 comments on commit cfd6d52

Please sign in to comment.