Wrap will error trying to generate a PDF if the input Fountain file contains a line ending with _.
Clark's other hand. He loosens his grip. _Lets go of the rope_.
panic: runtime error: index out of range [-1]
goroutine 1 [running]:
github.com/Wraparound/wrap/pdf.wordwrap(0xc00005c4e0, 0x3, 0x4, 0x2, 0x11e3f
6b, 0xc000020240, 0x128a33d)
/home/elecprog/Development/wrap/pdf/wordwrap.go:53 +0xb16
github.com/Wraparound/wrap/pdf.cellify(0xc00000c380, 0x1, 0x1, 0xc000020502,
0x128a33d, 0x7, 0x3)
/home/elecprog/Development/wrap/pdf/cellifying.go:44 +0xc9
github.com/Wraparound/wrap/pdf.sectionize(0x12d8880, 0xc00000c3a0, 0x0, 0x0,
0x0, 0x0, 0x0)
/home/elecprog/Development/wrap/pdf/sectionize.go:27 +0x1a7f
github.com/Wraparound/wrap/pdf.buildPDF(0xc000010bd0, 0x10a9f66, 0x5e1ada94,
0xc02c6280c8)
/home/elecprog/Development/wrap/pdf/pdf.go:104 +0x53a
github.com/Wraparound/wrap/pdf.WritePDF(0xc000010bd0, 0x12d8140, 0xc00002020
0, 0xc0000da000, 0xc00000e0d8)
/home/elecprog/Development/wrap/pdf/files.go:35 +0x2b
github.com/Wraparound/wrap/cli.export(0xc0000508e0, 0x1, 0x1, 0x1289937, 0x3
, 0x12999b0)
/home/elecprog/Development/wrap/cli/export.go:62 +0x276
github.com/Wraparound/wrap/cli.pdfRun(0x1466cc0, 0xc0000508e0, 0x1, 0x1)
/home/elecprog/Development/wrap/cli/pdf.go:88 +0x3c5
github.com/spf13/cobra.(*Command).execute(0x1466cc0, 0xc0000508b0, 0x1, 0x1,
0x1466cc0, 0xc0000508b0)
/home/elecprog/go/pkg/mod/github.com/spf13/[email protected]/command.go:7
66 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0x1466f20, 0xc000042750, 0xc00007
af50, 0x100535f)
/home/elecprog/go/pkg/mod/github.com/spf13/[email protected]/command.go:8
52 +0x2ea
github.com/spf13/cobra.(*Command).Execute(...)
/home/elecprog/go/pkg/mod/github.com/spf13/[email protected]/command.go:8
00
main.main()
/home/elecprog/Development/wrap/wrap.go:15 +0x31
PDF output generated.
The error can be worked around by switching the underscore and full stop, i.e.
However, I tend to write it the other way around, for aesthetic considerations.