File tree 3 files changed +13
-4
lines changed
3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ require (
6
6
github.com/canhlinh/svg2png v0.0.0-20201124065332-6ba87c82371f
7
7
github.com/gabriel-vasile/mimetype v1.4.2
8
8
github.com/go-pdf/fpdf v0.9.0
9
- github.com/gomarkdown/markdown v0.0.0-20230922105210-14b16010c2ee
9
+ github.com/gomarkdown/markdown v0.0.0-20240729212818-a2a9c4f76ef5
10
10
github.com/jessp01/gohighlight v0.21.1-7
11
11
golang.org/x/exp v0.0.0-20240707233637-46b078467d37
12
12
)
Original file line number Diff line number Diff line change @@ -7,8 +7,10 @@ github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q
7
7
github.com/gabriel-vasile/mimetype v1.4.2 /go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA =
8
8
github.com/go-pdf/fpdf v0.9.0 h1:PPvSaUuo1iMi9KkaAn90NuKi+P4gwMedWPHhj8YlJQw =
9
9
github.com/go-pdf/fpdf v0.9.0 /go.mod h1:oO8N111TkmKb9D7VvWGLvLJlaZUQVPM+6V42pp3iV4Y =
10
- github.com/gomarkdown/markdown v0.0.0-20230922105210-14b16010c2ee h1:gvsnG+uIVkOue7HrYAG2ZnOdLoJTqsLyuBFJaU0kX4M =
11
- github.com/gomarkdown/markdown v0.0.0-20230922105210-14b16010c2ee /go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA =
10
+ github.com/gomarkdown/markdown v0.0.0-20240626202925-2eda941fd024 h1:saBP362Qm7zDdDXqv61kI4rzhmLFq3Z1gx34xpl6cWE =
11
+ github.com/gomarkdown/markdown v0.0.0-20240626202925-2eda941fd024 /go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA =
12
+ github.com/gomarkdown/markdown v0.0.0-20240729212818-a2a9c4f76ef5 h1:8QWUW69MXlNdZXnDnD9vEQ1BL8/mm1FTiSesKKHYivk =
13
+ github.com/gomarkdown/markdown v0.0.0-20240729212818-a2a9c4f76ef5 /go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA =
12
14
github.com/jessp01/gohighlight v0.21.1-7 h1:u1CurHm8ogal3AFeDMF97pDJ4aPlPdgZg5PL6ULeTb0 =
13
15
github.com/jessp01/gohighlight v0.21.1-7 /go.mod h1:52r0Yxd1+T9f7uLenaO2/34K3gPOejxCxXwdNc/2Z8Y =
14
16
github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2 h1:YocNLcTBdEdvY3iDK6jfWXvEaM5OCKkjxPKoJRdB3Gg =
Original file line number Diff line number Diff line change @@ -59,7 +59,13 @@ func (r *PdfRenderer) processText(node *ast.Text) {
59
59
if r .cs .peek ().isHeader {
60
60
r .setStyler (currentStyle )
61
61
// get the string width of header value
62
- hw := r .Pdf .GetStringWidth (s ) + (2 * r .em )
62
+ initialWidth := r .Pdf .GetStringWidth (s )
63
+ /* if initialWidth == 0 {
64
+ initialWidth = 30
65
+ }
66
+ log.Println(s + ":")
67
+ log.Println(initialWidth)*/
68
+ hw := initialWidth + (2 * r .em )
63
69
// now append it
64
70
cellwidths = append (cellwidths , hw )
65
71
// now write it...
@@ -673,6 +679,7 @@ func (r *PdfRenderer) processTableRow(node ast.Node, entering bool) {
673
679
674
680
func (r * PdfRenderer ) processTableCell (node ast.TableCell , entering bool ) {
675
681
if entering {
682
+
676
683
r .tracer ("TableCell (entering)" , "" )
677
684
x := & containerState {
678
685
textStyle : r .Normal , listkind : notlist ,
You can’t perform that action at this time.
0 commit comments