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 ""
def regex(self): lang = extentions.get(self.filepath.ext) return RE_TAGS.get(lang, RE_TAGS["sh"])