Skip to content

Commit

Permalink
make long links in text not break everything
Browse files Browse the repository at this point in the history
  • Loading branch information
dikkadev committed Jan 7, 2023
1 parent 9d93be4 commit 4a8b042
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion globals/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package globals

const Version = "1.9.1"
const Version = "1.9.2"
9 changes: 8 additions & 1 deletion pdf/spec/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,14 @@ func (p *Text) Process(maxWidth float64) {
i++
continue
}
split := strings.Split(s.Content, " ")
//split := strings.Split(s.Content, " ")
splitSmall := strings.Split(s.Content, " ")
split := make([]string, 0)
for _, s := range splitSmall {
if len(s) > 0 {
split = append(split, strings.SplitAfter(s, "/")...)
}
}
for j := 0; j < len(split); {
w := split[j]
if j != 0 && strings.TrimSpace(w) == "" {
Expand Down

0 comments on commit 4a8b042

Please sign in to comment.