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