diff --git a/templates/question-checkbox.html b/templates/question-checkbox.html index 3a63df1..4e398c9 100644 --- a/templates/question-checkbox.html +++ b/templates/question-checkbox.html @@ -5,10 +5,16 @@
{% for n, opt in enumerate(q['options']) %} - - - - + +
+
+ +
+
+ +
+
+
{% end %}
diff --git a/templates/question-radio.html b/templates/question-radio.html index 5688b34..c8bc4bb 100644 --- a/templates/question-radio.html +++ b/templates/question-radio.html @@ -5,10 +5,16 @@
{% for n, opt in enumerate(q['options']) %} - - - - + +
+
+ +
+
+ +
+
+
{% end %}
diff --git a/tools.py b/tools.py index d08a850..e3f06db 100644 --- a/tools.py +++ b/tools.py @@ -124,7 +124,7 @@ class HighlightRenderer(mistune.Renderer): return fr'$$$ {text} $$$' -markdown = MarkdownWithMath(HighlightRenderer(escape=False)) # hard_wrap=True to insert
on newline +markdown = MarkdownWithMath(HighlightRenderer(escape=True)) # hard_wrap=True to insert
on newline def md_to_html(text, q=None): return markdown(text) @@ -135,8 +135,14 @@ def md_to_html(text, q=None): def load_yaml(filename, default=None): try: f = open(path.expanduser(filename), 'r', encoding='utf-8') + except FileNotFoundError: + logger.error(f'Can\'t open "{script}": not found.') + return default + except PermissionError: + logger.error(f'Can\'t open "{script}": no permission.') + return default except IOError: - logger.error(f'Can\'t open file "{filename}"') + logger.error(f'Can\'t open file "{filename}".') return default else: with f: -- libgit2 0.21.2