Skip to content

Commit 2faf732

Browse files
Pull out variable
1 parent 6287828 commit 2faf732

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ocamlutil/pretty.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ let breakString init s =
8787
j := i
8888
end
8989
done;
90+
let text = Text (String.sub s 0 !j) in
9091
if !r = Nil then
91-
Text (String.sub s 0 !j)
92+
text
9293
else
93-
Concat(Text (String.sub s 0 !j), Concat(Line, !r))
94+
Concat(text, Concat(Line, !r))
9495

9596

9697
let nil = Nil

0 commit comments

Comments
 (0)