Skip to content

Commit

Permalink
Merge pull request #38 from musicEnfanthen/main
Browse files Browse the repository at this point in the history
fix(utils): replace paragraph changes with linebreaks
  • Loading branch information
musicEnfanthen authored Jun 25, 2024
2 parents 8baebb5 + 2094890 commit 2c82da1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions convert_source_description/utils_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def replace_glyphs(self, text: str) -> str:
# Public method: strip_tag_and_clean
############################################

def strip_tag_and_clean(self, content, tag):
def strip_tag_and_clean(self, content, tag) -> str:
"""
Strips opening and closing tags from an HTML string and strips surrounding paragraph tags.
Expand All @@ -182,7 +182,8 @@ def strip_tag_and_clean(self, content, tag):
Returns:
str: The content within the specified tags, with leading and trailing whitespace removed.
"""
return self._strip_tag(self._strip_tag(content, tag), P_TAG)
stripped_content = self._strip_tag(self._strip_tag(content, tag), P_TAG)
return stripped_content.replace('</p><p>', ' <br /> ')

############################################
# Helper function: _get_siglum
Expand Down

0 comments on commit 2c82da1

Please sign in to comment.