Skip to content

Commit 0645e3c

Browse files
committed
Fix {more} functionality (#1351)
1 parent ef4b1a2 commit 0645e3c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

rdmo/core/templates/core/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
{% block js %}
1919
<script src="{% url 'javascript-catalog' %}"></script>
2020
<script src="{% static 'core/js/base.js' %}"></script>
21+
<script src="{% static 'core/js/utils.js' %}"></script>
2122
{% endblock %}
2223

2324
{% block head %}{% endblock %}

rdmo/core/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ def markdown2html(markdown_string):
260260
show_string = _('show more')
261261
hide_string = _('show less')
262262
html = re.sub(
263-
r'(\{more\})(.*?)</p>$',
263+
r'(\{more\})(.*?)$',
264264
f'<span class="show-more" onclick="showMore(this)">... ({show_string})</span>'
265265
r'<span class="more">\2</span>'
266-
f'<span class="show-less" onclick="showLess(this)"> ({hide_string})</span></p>',
266+
f'<span class="show-less" onclick="showLess(this)"> ({hide_string})</span>',
267267
html
268268
)
269269

0 commit comments

Comments
 (0)