From 3e2e7f25bf93b2172bd48685bf04089244480c34 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 27 Jun 2022 17:21:48 +0100 Subject: [PATCH] Fix unit tests --- blog.py | 2 +- epicyon-profile.css | 4 ++++ markdown.py | 21 +++++++++++---------- tests.py | 14 ++++++++------ webapp_podcast.py | 2 +- webapp_post.py | 2 +- 6 files changed, 26 insertions(+), 19 deletions(-) diff --git a/blog.py b/blog.py index eb8766076..fde6de7c5 100644 --- a/blog.py +++ b/blog.py @@ -313,7 +313,7 @@ def _html_blog_post_content(debug: bool, session, authorized: bool, if citations_str: citations_str = '

' + translate['Citations'] + \ ':

' + \ - '\n' + '\n' + citations_str + '\n' blog_str += '
\n' + citations_str diff --git a/epicyon-profile.css b/epicyon-profile.css index b3a3ab8a3..f2c310edf 100644 --- a/epicyon-profile.css +++ b/epicyon-profile.css @@ -256,6 +256,10 @@ code { line-height: var(--code-spacing); } +ul.md_list { + color: var(--main-fg-color); +} + audio { width: 100%; } diff --git a/markdown.py b/markdown.py index d8b124bac..192a9e7a7 100644 --- a/markdown.py +++ b/markdown.py @@ -68,13 +68,13 @@ def _markdown_emphasis_html(markdown: str) -> str: '*)': ')', '*,': ',', '*\n': '\n', - ' _': ' ', - '_.': '.', - '_:': ':', - '_;': ';', - '_,': ',', - '_\n': '\n', + ' _': ' ', + '_ ': ' ', + '_.': '.', + '_:': ':', + '_;': ';', + '_,': ',', + '_\n': '\n', ' `': ' ', '`.': '.', '`:': ':', @@ -100,14 +100,14 @@ def _markdown_emphasis_html(markdown: str) -> str: elif section_text.startswith('*'): section_text = section_text[1:] + '' elif section_text.startswith('_'): - section_text = section_text[1:] + '' + section_text = section_text[:len(section_text) - 1] + '' if section_text.strip(): markdown += section_text @@ -259,7 +259,8 @@ def _markdown_replace_bullet_points(markdown: str) -> str: for index in range(start_line, line_ctr): line_text = lines[index].replace(bullet_matched, '', 1) if index == start_line: - lines[index] = '