Skip to content

Commit

Permalink
Fixing the Bulletin Builder Foramtter for line break.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayur Dhamanwala committed Jul 7, 2016
1 parent 62056c2 commit bbfabf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def can_format(self, format_type, article):
return format_type == 'AAP BULLETIN BUILDER'

def get_text_content(self, content):
content.replace('<br>', '<br/>').replace('</br>', '')
content = content.replace('<br>', '<br/>').replace('</br>', '')
soup = BeautifulSoup(content, 'html.parser')

for top_level_tag in soup.find_all(recursive=False):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ def test_strip_html_mixed_tags(self):
def test_takes_package(self):
html = ('<p>Para1: A tropical cyclone is a rapidly rotating storm system</p>'
'<p>Para2: Tropical refers to the geographical origin of these systems</p>'
'<br />'
'<br>'
'<p>Para3:Tropical refers to the geographical origin of these systems</p>'
'<br />'
'<br>'
'<p>Para4:Tropical refers to the geographical origin of these systems</p>')
formatted_content = self._formatter.get_text_content(html)

Expand Down

0 comments on commit bbfabf5

Please sign in to comment.