Skip to content
Snippets Groups Projects
Commit ea530fe8 authored by Seblu's avatar Seblu
Browse files

tag glob in tagdisplay

parent 54739920
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ import re
import math
import ConfigParser
import time
import fnmatch
class TagDisplay(object):
'''Handle tagdisplay stuff'''
......@@ -60,8 +61,9 @@ class TagDisplay(object):
if bool(self.option.get("quotespace", False)):
if re.search("\s", tagvalue) is not None:
tagvalue = "'%s'"%re.sub("'", "\'", tagvalue)
if tagname in self.tagtype and self.tagtype[tagname] in self.types:
return getattr(self, "type_%s"%self.tagtype[tagname])(tagvalue)
l = [ x for x in self.tagtype if fnmatch.fnmatch(tagname, x) ]
if len(l) > 0 and self.tagtype[l[0]] in self.types:
return getattr(self, "type_%s"%self.tagtype[l[0]])(tagvalue)
return tagvalue
def type_lower(self, value):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment