Issue #4456 open

Please support obtaining the file markup format from vim modelines (BB-5100)

Michał Górny
created an issue

Right now, bitbucket can only display files with pretty specific (and custom) suffixes. It would be great if it could at least attempt a little to try to find out the file format by looking at its contents.

AFAICS Pygments have no support for syntax coloring of markup files, so that shouldn't collide. I have been working on a [[|modeline parser module]] for Python which could serve the purpose well. I will be happy to adjust the code to fit your needs.

The use is quite straightforward:



import pymodeline

ml = pymodeline.ModelineParser() opts = ml.parse_buffer( syn = opts.get('filetype', None) or opts.get('syntax', None)