diff --git a/app/lib/babycode.py b/app/lib/babycode.py index 4c7ea7e..b622c79 100644 --- a/app/lib/babycode.py +++ b/app/lib/babycode.py @@ -6,7 +6,7 @@ from pygments.lexers import get_lexer_by_name from pygments.util import ClassNotFound as PygmentsClassNotFound import re -BABYCODE_VERSION = 4 +BABYCODE_VERSION = 5 NAMED_COLORS = [ 'black', 'silver', 'gray', 'white', 'maroon', 'red', @@ -61,7 +61,7 @@ def tag_code(children, attr, surrounding): return f"{children}" else: input_code = children.strip() - button = f"" + button = f"" unhighlighted = f"
code block{button}{input_code}
" if not attr: return unhighlighted @@ -94,7 +94,7 @@ def tag_color(children, attr, surrounding): def tag_spoiler(children, attr, surrounding): spoiler_name = attr if attr else "Spoiler" content = f"" - container = f"""""" + container = f"""""" return container def tag_image(children, attr, surrounding): diff --git a/app/templates/common/macros.html b/app/templates/common/macros.html index a627d19..6ad3a4c 100644 --- a/app/templates/common/macros.html +++ b/app/templates/common/macros.html @@ -79,26 +79,26 @@ {%- endmacro %} {% macro babycode_editor_component(ta_name, ta_placeholder="Post body", optional=False, prefill="", banned_tags=[]) %} -
+
- - + +
- - - - - - - - - - + + + + + + + + + + - + babycode guide {% if banned_tags %}
Forbidden tags:
@@ -111,7 +111,7 @@
{% endif %}
-
+
Type something!
@@ -207,7 +207,7 @@ {% if show_reply %} {% set qtext = "[url=%s]%s said:[/url]" | format(post_permalink, post['username']) %} {% set reply_text = "%s\n[quote]\n%s\n[/quote]\n" | format(qtext, post['original_markup']) %} - + {% endif %} {% set show_delete = false %} @@ -272,13 +272,13 @@
{% endmacro %} -{% macro accordion(hidden=false, style="", disabled=false) %} +{% macro accordion(hidden=false, disabled=false) %} {% if disabled %} {% set hidden = true %} {% endif %} -