예제 #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
예제 #2
0
파일: templates.py 프로젝트: Joozo/pygments
 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
예제 #3
0
파일: templates.py 프로젝트: Mekyi/crunchy
 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
예제 #4
0
 def analyse_text(text):
   if XmlLexer.analyse_text(text) > 0 and '<simulation' in text:
     return 0.8