diff options
author | Phil Hughes <me@iamphill.com> | 2017-03-16 20:04:58 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-03-23 13:52:55 +0300 |
commit | f9ced97a97f5bebec57545fbf611952026bf0d5d (patch) | |
tree | e1a8a44b76d7404c1aca4dfe5ff7e3bb0460650c /app/models/blob.rb | |
parent | 51d111903f069cc56143b144f881b1c87e553c3b (diff) |
Started iPython 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 |