Originally created by: lsproc
Currently we look for MIME types starting with text/ -- this should be expanded to handle all the popular programming languages. Additionally, there is a method to specify 'additional viewable extensions' for the SCM tools. Unfortunately this is ignored when deciding whether a file is viewable.
When a file is detected as not viewable in the web browser by the file viewer, a message appears to signal this, allowing you to force open the file. The file displays correctly when forced, therefore, the error should not appear in the first place.
Example: https://sourceforge.net/p/umstools/code/28/tree/trunk/config.php
We should also use our "pypeline" rendering that we do for README files for all .md, .rst, etc files that it can handle.
Diff:
Diff:
On allura js/2151. To test:
I get an error:
Running tests in module AlluraTesting
Allura/allura/model/repository.py:1065: invalid syntax
if self.content_type.startswith('text/') or self.extension in VIEWABLE_EXTENSIONS or
Made a typo in some last minute formatting improvements, sorry. It's fixed now.
Merged to dev