Skip to content

Commit

Permalink
Show More link on product about page accessibility (#2063)
Browse files Browse the repository at this point in the history
  • Loading branch information
annagav authored Jan 19, 2024
1 parent 874866d commit 3562b74
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cms/templatetags/expand.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ def expand(text):
output = f'{pre}<p class="expand_here_container"><a href="#" class="expand_here_link" data-expand-body="{container_uuid}">Show More</a></p><div class="expand_here_body" id="exp{container_uuid}">{str(expand_here[0])}{post}</div>'
elif len(soup.find_all(["p", "div"])) > 1:
expand_here = soup.find_all(["p", "div"], limit=2)

pre = str(expand_here[0])
post = "".join([str(sib) for sib in expand_here[1].find_next_siblings()])

output = f'<!-- pre -->{pre}<!-- /pre --><div class="expand_here_body" id="exp{container_uuid}">{str(expand_here[1])}{post}</div><p class="expand_here_container"><a href="#" class="expand_here_link fade" data-expand-body="{container_uuid}">Show More</a></p>'
output = f'<!-- pre -->{pre}<!-- /pre --><p class="expand_here_container"><a href="#" class="expand_here_link fade" data-expand-body="{container_uuid}">Show More</a></p><div class="expand_here_body hide" id="exp{container_uuid}">{str(expand_here[1])}{post}</div>'
elif len(text.split("\n\n")) > 1:
(pre, post) = text.split("\n\n", maxsplit=1)

Expand Down

0 comments on commit 3562b74

Please sign in to comment.