diff options
author | Phil Hughes <me@iamphill.com> | 2017-03-16 17:04:58 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-03-16 17:04:58 +0000 |
commit | b9c5d1cc6edda48080779f2942ae3cd4236d6ef3 (patch) | |
tree | bee772aa62111907a9c273b483b105fadeca4b04 /app/models/blob.rb | |
parent | 9f6299c47f22893fb135cab38652749cd473b62b (diff) | |
download | gitlab-ce-ipython-notebook-viewer.tar.gz |
Started iPython notebook vieweripython-notebook-viewer
Using NotebookLab library
[ci skip]
Diffstat (limited to 'app/models/blob.rb')
-rw-r--r-- | app/models/blob.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/blob.rb b/app/models/blob.rb index 1376b86fdad..5b71ac21cc0 100644 --- a/app/models/blob.rb +++ b/app/models/blob.rb @@ -46,6 +46,10 @@ class Blob < SimpleDelegator text? && language && language.name == 'SVG' end + def ipython_notebook? + text? && language && language.name == 'Jupyter Notebook' + end + def size_within_svg_limits? size <= MAXIMUM_SVG_SIZE end @@ -63,6 +67,8 @@ class Blob < SimpleDelegator end elsif image? || svg? 'image' + elsif ipython_notebook? + 'notebook' elsif text? 'text' else |