Skip to content

Commit baa276e

Browse files
committed
fixing formatting in fractions and square roots
1 parent 1cd0bc8 commit baa276e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mathics/format/pane_text.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def fraction(a: Union[TextBlock, str], b: Union[TextBlock, str]) -> TextBlock:
233233
a = TextBlock(a)
234234
if isinstance(b, str):
235235
b = TextBlock(b)
236-
width = max(b.width, a.width) + 2
236+
width = max(b.width, a.width)
237237
frac_bar = TextBlock(width * "-")
238238
result = frac_bar.stack(a)
239239
result = b.stack(result)
@@ -416,7 +416,7 @@ def sqrt_block(
416416
"\n".join("|" + line for line in a.text.split("\n")), base=a.base
417417
)
418418
result_2 = result_2.stack((a.width + 1) * "_", align="l")
419-
half_height = int(a_height / 2)
419+
half_height = int(a_height / 2 + 1)
420420

421421
result_1 = TextBlock(
422422
"\n".join(

0 commit comments

Comments
 (0)