diff options
-rw-r--r-- | spoiler.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -25,7 +25,7 @@ class SpoilerElement(inline.InlineElement): class SpoilerRenderer: def render_spoiler_element(self, element: SpoilerElement): content = self.render_children(element) - return f'<span><input type="checkbox" class="spoiler" id="{element.id}"><label class="spoiler-on" for="{element.id}"><span>{"▉" * len(unescape(content))}</span></label><label class="spoiler-off" for="{element.id}"><span>{content}</span></label></span>' + return f'<span><input type="checkbox" class="spoiler" id="{element.id}"><label class="spoiler-on" for="{element.id}"><span>{"".join(["▉" if char != " " else " " for char in unescape(content)])}</span></label><label class="spoiler-off" for="{element.id}"><span>{content}</span></label></span>' Spoiler = MarkoExtension( |