Skip to content

Commit

Permalink
unicode format compatible with 2 and 3
Browse files Browse the repository at this point in the history
  • Loading branch information
zfletch committed Jun 13, 2018
1 parent 3f66590 commit b51fb1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beta_code/beta_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ def beta_code_to_greek(beta_code):
return sigma_to_end_of_word_sigma(u''.join(greek_characters))

def sigma_to_end_of_word_sigma(string):
return re.sub(ur'σ(?=[,.:;·\s]|$)', u'ς', string)
regex = re.compile(u'σ(?=[,.:;·\s]|$)')

return re.sub(regex, u'ς', string)

0 comments on commit b51fb1b

Please sign in to comment.