ThirdParty/Pygments/pygments/lexers/matlab.py

changeset 6651
e8f3b5568b21
parent 5713
6762afd9f963
equal deleted inserted replaced
6650:1dd52aa8897c 6651:e8f3b5568b21
132 (r'(\s*)([a-zA-Z_]\w*)', bygroups(Text, Name.Function), '#pop'), 132 (r'(\s*)([a-zA-Z_]\w*)', bygroups(Text, Name.Function), '#pop'),
133 ], 133 ],
134 } 134 }
135 135
136 def analyse_text(text): 136 def analyse_text(text):
137 if re.match('^\s*%', text, re.M): # comment 137 if re.match(r'^\s*%', text, re.M): # comment
138 return 0.2 138 return 0.2
139 elif re.match('^!\w+', text, re.M): # system cmd 139 elif re.match(r'^!\w+', text, re.M): # system cmd
140 return 0.2 140 return 0.2
141 141
142 142
143 line_re = re.compile('.*?\n') 143 line_re = re.compile('.*?\n')
144 144

eric ide

mercurial