Tickets

Issues

# TODO: factorize this with the files page rendering


        # TODO: factorize this with the files page rendering
        m = Magic(mime=True)
        mime = m.from_buffer(content)

        if mime == 'text/x-c':
            mime = 'text/x-csrc'

History
    Changed by Laurent Defert on 2013-01-01 18:17:53 during 5d973bbe3c8d175ea9fa3c5eb0891c1054b53b33
  • Status: Open - Closed
  • Changed by Laurent Defert on 2012-12-30 17:50:05 during efbb825890c864d6542e2760cfea7fbb39d755cb
  • Content: updated from
                # TODO: factorize this with the files page rendering
                m = Magic(mime=True)
                mime = m.from_buffer(content)
                if mime == 'text/x-c':
                    mime = 'text/x-csrc'
                elif mime == 'text/x-c++':
    
  • Changed by Laurent Defert on 2012-12-24 21:55:01 during 616d63bc29aee9a7598e302c7cdf3f179fd67d07
  • Content: updated from
                # TODO: factorize this with the files page rendering
                m = Magic(mime=True)
                mime = m.from_buffer(content)
    
                try:
                    lexer = get_lexer_for_mimetype(mime)