Skip to content

Commit

Permalink
Using safer 'replaceFirst' function.
Browse files Browse the repository at this point in the history
  • Loading branch information
sauliusg committed Mar 8, 2018
1 parent afb3f5b commit 789e9e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ public String toString() {
result = split[0] + "\n" +
"%%BoundingBox: (atend)\n" +
split[1].
replaceAll("(\\d+ ){4}setmargins",
replaceFirst("(\\d+ ){4}setmargins",
"0 0 0 0 setmargins").
replaceAll("(\\d+ ){2}setpagesize",
replaceFirst("(\\d+ ){2}setpagesize",
dim.width + " " + dim.height +
" setpagesize") +
boundingBox;
Expand Down

0 comments on commit 789e9e3

Please sign in to comment.