Skip to content

Commit

Permalink
Use non-capturing regex group to keep semantics intact downstream
Browse files Browse the repository at this point in the history
  • Loading branch information
frankrolf authored and josh-hadley committed Aug 22, 2020
1 parent 442e5a4 commit 4cdad52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/afdko/agd.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def parse(self, intext):
# Check a glyph for internal conflicts, problems, etc.
def check(self):
m = [] # holds reports of what was fixed
u = re.compile(r'u(ni)?([0-9A-F]{4,5})$') # Unicode value regexp
u = re.compile(r'u(?:ni)?([0-9A-F]{4,5})$') # Unicode value regexp
n = {}
# process aliases: remove duplicates, uninames, final names:
for a in self.ali:
Expand All @@ -82,12 +82,12 @@ def check(self):
if not self.uni:
if self.fin and u.match(self.fin):
m.append("Found Unicode value in final name '%s' of glyph '%s'." % (self.fin, self.name))
self.uni = u.match(self.fin).group(2) # Get Unicode from final name
self.uni = u.match(self.fin).group(1) # Get Unicode from final name
else:
for a in self.ali:
if u.match(a):
m.append("Found Unicode value in alias '%s' of glyph '%s'." % (a, self.name))
self.uni = u.match(a).group(2)
self.uni = u.match(a).group(1)
break
return m

Expand Down

0 comments on commit 4cdad52

Please sign in to comment.