Skip to content

Commit

Permalink
add fix for newscentre and anpa
Browse files Browse the repository at this point in the history
  • Loading branch information
marwoodandrew committed Jul 7, 2016
1 parent 46c0411 commit 4d8ae5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/aap/publish/formatters/aap_newscentre_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def format_text_content(self, tag):
else:
child_tag.replace_with(' {}'.format(child_tag.get_text()))

para_text = re.sub(' +', ' ', tag.get_text().strip().replace('\xA0', ' '))
para_text = re.sub(' +', ' ', tag.get_text().strip().replace('\n\n', ' ').replace('\xA0', ' '))
if para_text != '':
tag.replace_with(' {}\r\n\r\n'.format(para_text))
else:
Expand Down
2 changes: 1 addition & 1 deletion server/aap/publish/formatters/anpa_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def format_text_content(self, tag):
else:
child_tag.replace_with(' {}'.format(child_tag.get_text()))

para_text = re.sub(' +', ' ', tag.get_text().strip().replace('\xA0', ' '))
para_text = re.sub(' +', ' ', tag.get_text().strip().replace('\n\n', ' ').replace('\xA0', ' '))
if para_text != '':
tag.replace_with(' {}\r\n'.format(para_text))
else:
Expand Down

0 comments on commit 4d8ae5d

Please sign in to comment.