示例#1
0
 def convert(self, tag_names):
     if tag_names:
         lang = extentions.get(self.filepath.ext)
         comment = RE_TAGS.get(lang, "#")
         return (RE_TEMPLATE % comment) + ", ".join(tag_names) + "\n"
     else:
         return ""
示例#2
0
 def regex(self):
     lang = extentions.get(self.filepath.ext)
     return RE_TAGS.get(lang, RE_TAGS["sh"])