git @ Cat's Eye Technologies klaus / bc31c69
Fix syntax highlighting wrt. ambiguous file extensions. See: https://groups.google.com/forum/#!topic/klaus-users/OKyd4suHN2g .m files may be both Matlab and Objective-C. Pygments already handles these cases gracefully; not sure why didn't use it in the past. Thanks to Gnewbee for the report. Jonas Haag 11 years ago
1 changed file(s) with 1 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
7474 if render_markup and markup.can_render(filename):
7575 return markup.render(filename, code)
7676
77 try:
78 lexer = get_lexer_for_filename(filename)
79 except ClassNotFound:
80 lexer = guess_lexer(code)
81
77 lexer = get_lexer_for_filename(filename, code)
8278 return highlight(code, lexer, KlausFormatter())
8379
8480