Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
 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
Esempio n. 4
0
 def analyse_text(text):
   if XmlLexer.analyse_text(text) > 0 and '<simulation' in text:
     return 0.8