Philipp Hörist pushed to branch master at gajim / gajim
Commits:
90f380d1 by André Apitzsch at 2022-03-06T13:06:55+01:00
Styling: Remove superfluous empty line after preformatted text
The text block might contain a newline after the closing ```.
Remove it, so that `text.partition('\n')[2][:-4]` returns the expected
substring.
Fixes #10787.
- - - - -
1 changed file:
- gajim/gtk/conversation/code_widget.py
Changes:
=====================================
gajim/gtk/conversation/code_widget.py
=====================================
@@ -82,6 +82,7 @@ def add_content(self, block: PreBlock):
@staticmethod
def _prepare_code(text: str) -> Tuple[str, Optional[str]]:
+ text = text.strip()
code_start = text.partition('\n')[0]
lang = None
if len(code_start) > 3:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/90f380d13e1c2fcd5df8e7357108289311eabfd1
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/90f380d13e1c2fcd5df8e7357108289311eabfd1
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits