From 86c234f2a171360a10507dfaa57c7e852b0227d3 Mon Sep 17 00:00:00 2001 From: int-y1 Date: Wed, 24 Jan 2024 02:31:34 -0500 Subject: [PATCH] Add Kazakh language option in UI --- dmoj/settings.py | 1 + judge/jinja2/markdown/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dmoj/settings.py b/dmoj/settings.py index a08bbd8dff..5c1b97bda3 100644 --- a/dmoj/settings.py +++ b/dmoj/settings.py @@ -398,6 +398,7 @@ ('hr', _('Croatian')), ('hu', _('Hungarian')), ('ja', _('Japanese')), + ('kk', _('Kazakh')), ('ko', _('Korean')), ('pt', _('Brazilian Portuguese')), ('ro', _('Romanian')), diff --git a/judge/jinja2/markdown/__init__.py b/judge/jinja2/markdown/__init__.py index 6bb8d689b3..6f64414089 100644 --- a/judge/jinja2/markdown/__init__.py +++ b/judge/jinja2/markdown/__init__.py @@ -154,9 +154,9 @@ def strip_paragraphs_tags(tree): parent = p.getparent() prev = p.getprevious() if prev is not None: - prev.tail = (prev.tail or '') + p.text + prev.tail = (prev.tail or '') + (p.text or '') else: - parent.text = (parent.text or '') + p.text + parent.text = (parent.text or '') + (p.text or '') parent.remove(p)