Closed mauri-medina closed 4 years ago
Height of the speech bubbles that not have a tail
The way a render calculate the max height of its image its counting the lines in the image
self._max_height = max(len(image), self._max_height)
When constructing a speech bubble a new line is always added at the end of the bubble, whether or not it has a tail
bubble = "╭─" + "─" * max_len + "─╮\n" for line in text.split("\n"): filler = " " * (max_len - len(line)) bubble += "│ " + line + filler + " │\n" bubble += "╰─" + "─" * max_len + "─╯\n"
the last \n increase the bubble size by one by creating a new empty line. The new line is needed only when there is a tail
\n
Looks good. Just waiting for a fix to the SCM package we use for builds before merging.
Coverage remained the same at 94.644% when pulling 9e8a7bddfde38d30f88f242bc5674e61ebd24124 on mauri-medina:fix-speech-bubble-height into 2bf39ac7bde5f9bfcd4559476a72220949438629 on peterbrittain:master.
Issues fixed by this PR
Height of the speech bubbles that not have a tail
What does this implement/fix?
The way a render calculate the max height of its image its counting the lines in the image
self._max_height = max(len(image), self._max_height)
When constructing a speech bubble a new line is always added at the end of the bubble, whether or not it has a tail
the last
\n
increase the bubble size by one by creating a new empty line. The new line is needed only when there is a tail