Skip to content

Commit

Permalink
Update pdf_converter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
richmahn authored Jun 21, 2024
1 parent 2f9c93a commit 8e24cb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion converters/pdf/pdf_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,9 @@ def replace_rc_links(self, text):
part = BeautifulSoup(f'<a href="#{self.all_rcs[rc_link].article_id}" class="pageref round bold black local-article">{self.all_rcs[rc_link].title}</a>',
'html.parser').find('a')
else:
part = BeautifulSoup(f'<span class="remove-article">{self.all_rcs[rc_link].title} <a href="htts://preview.door43.org/u/unfoldingWord/en_ta#{self.all_rcs[rc_link].article_id}" target="ta-pdf">(UTA PDF)</span>', 'html.parser').find('span')
articleIdParts = self.all_rcs[rc_link].article_id.split('-')
articleHash = articleIdParts[3] + '--' + '-'.join(articleIdParts[4:])
part = BeautifulSoup(f'<span class="remove-article">{self.all_rcs[rc_link].title} <a href="https://preview.door43.org/u/unfoldingWord/en_ta#{articleHash}" target="ta-pdf">(UTA PDF)</span>', 'html.parser').find('span')
else:
part = soup.new_string(part)
last_part.insert_after(part)
Expand Down

0 comments on commit 8e24cb0

Please sign in to comment.