Skip to content

Commit

Permalink
Fix newline parsing (kmille#33)
Browse files Browse the repository at this point in the history
UG has apparently started migrating the tab format from
the CRLF line-ending format to the LF line-ending format.

Thus, some tabs now appear broken. This change regards
single LF characters as newlines as well and fixes
the broken tabs.
  • Loading branch information
dexterlb authored May 26, 2024
1 parent 3f43e13 commit ef2005a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions freetar/ug.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def __repr__(self):
def fix_tab(self):
tab = self.tab
tab = tab.replace("\r\n", "<br/>")
tab = tab.replace("\n", "<br/>")
tab = tab.replace(" ", "&nbsp;")
tab = tab.replace("[tab]", "")
tab = tab.replace("[/tab]", "")
Expand Down

0 comments on commit ef2005a

Please sign in to comment.