def analyse_text(text): rv = 0.0 if re.search('\$\{.*?\}', text) is not None: rv += 0.2 if re.search('py:(.*?)=["\']', text) is not None: rv += 0.2 return rv + XmlLexer.analyse_text(text) - 0.01
def analyse_text(text): rv = 0.0 if re.search("\$\{.*?\}", text) is not None: rv += 0.2 if re.search("py:(.*?)=[\"']", text) is not None: rv += 0.2 return rv + XmlLexer.analyse_text(text) - 0.01
def analyse_text(text): if XmlLexer.analyse_text(text) > 0 and '<simulation' in text: return 0.8