Skip to content

Commit

Permalink
GH-61: added new line characters to html rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan Blythe authored and tabergma committed Oct 4, 2018
1 parent fcd0c3f commit cc65d79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flair/visual/activations.py
Expand Up @@ -57,6 +57,9 @@ def highlight(self, activation, text, file_='resources/data/highlight.html'):
for i, (char, color) in enumerate(zip(list(text), colors)):
str_ += self._render(char, color)

if i % 100 == 0 and i > 0:
str_ += '<br>'

with open(file_, 'w') as f:
f.write(str_)

Expand Down

0 comments on commit cc65d79

Please sign in to comment.