diff --git a/boards/mdx_neboard.py b/boards/mdx_neboard.py
--- a/boards/mdx_neboard.py
+++ b/boards/mdx_neboard.py
@@ -169,10 +169,10 @@ def render_tag(tag_name, value, options,
def render_spoiler(tag_name, value, options, parent, context):
text_len = len(value)
- pre_spaces = ' ' * max(random.randint(0, text_len // 2), 2)
- post_spaces = ' ' * max(random.randint(0, text_len // 2), 2)
- return '{}{}{}'.format(pre_spaces, value,
- post_spaces)
+ space_count = random.randint(0, text_len * 2)
+ side_spaces = ' ' * (space_count // 2)
+ return '{}{}{}'.format(side_spaces, value,
+ side_spaces)
return quote_element