Show More
@@ -169,10 +169,10 b' def render_tag(tag_name, value, options,' | |||||
169 |
|
169 | |||
170 | def render_spoiler(tag_name, value, options, parent, context): |
|
170 | def render_spoiler(tag_name, value, options, parent, context): | |
171 | text_len = len(value) |
|
171 | text_len = len(value) | |
172 |
|
|
172 | space_count = random.randint(0, text_len * 2) | |
173 |
|
|
173 | side_spaces = ' ' * (space_count // 2) | |
174 |
return '<span class="spoiler">{}{}{}</span>'.format( |
|
174 | return '<span class="spoiler">{}{}{}</span>'.format(side_spaces, value, | |
175 |
|
|
175 | side_spaces) | |
176 |
|
176 | |||
177 | return quote_element |
|
177 | return quote_element | |
178 |
|
178 |
General Comments 0
You need to be logged in to leave comments.
Login now