Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
cb4ac95d
Commit
cb4ac95d
authored
Aug 16, 2019
by
Vaibhav Sagar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipython-kernel: support custom mimetypes
parent
d98969dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Types.hs
ipython-kernel/src/IHaskell/IPython/Types.hs
+3
-1
No files found.
ipython-kernel/src/IHaskell/IPython/Types.hs
View file @
cb4ac95d
...
@@ -779,6 +779,7 @@ data MimeType = PlainText
...
@@ -779,6 +779,7 @@ data MimeType = PlainText
|
MimeVega
|
MimeVega
|
MimeVegalite
|
MimeVegalite
|
MimeVdom
|
MimeVdom
|
MimeCustom
Text
deriving
(
Eq
,
Typeable
,
Generic
)
deriving
(
Eq
,
Typeable
,
Generic
)
-- Extract the plain text from a list of displays.
-- Extract the plain text from a list of displays.
...
@@ -806,6 +807,7 @@ instance Show MimeType where
...
@@ -806,6 +807,7 @@ instance Show MimeType where
show
MimeVega
=
"application/vnd.vega.v2+json"
show
MimeVega
=
"application/vnd.vega.v2+json"
show
MimeVegalite
=
"application/vnd.vegalite.v2+json"
show
MimeVegalite
=
"application/vnd.vegalite.v2+json"
show
MimeVdom
=
"application/vdom.v1+json"
show
MimeVdom
=
"application/vdom.v1+json"
show
(
MimeCustom
custom
)
=
Text
.
unpack
custom
instance
Read
MimeType
where
instance
Read
MimeType
where
readsPrec
_
"text/plain"
=
[(
PlainText
,
""
)]
readsPrec
_
"text/plain"
=
[(
PlainText
,
""
)]
...
@@ -822,7 +824,7 @@ instance Read MimeType where
...
@@ -822,7 +824,7 @@ instance Read MimeType where
readsPrec
_
"application/vnd.vega.v2+json"
=
[(
MimeVega
,
""
)]
readsPrec
_
"application/vnd.vega.v2+json"
=
[(
MimeVega
,
""
)]
readsPrec
_
"application/vnd.vegalite.v1+json"
=
[(
MimeVegalite
,
""
)]
readsPrec
_
"application/vnd.vegalite.v1+json"
=
[(
MimeVegalite
,
""
)]
readsPrec
_
"application/vdom.v1+json"
=
[(
MimeVdom
,
""
)]
readsPrec
_
"application/vdom.v1+json"
=
[(
MimeVdom
,
""
)]
readsPrec
_
_
=
[
]
readsPrec
_
t
=
[(
MimeCustom
(
Text
.
pack
t
),
""
)
]
-- | Convert a MIME type and value into a JSON dictionary pair.
-- | Convert a MIME type and value into a JSON dictionary pair.
displayDataToJson
::
DisplayData
->
(
Text
,
Value
)
displayDataToJson
::
DisplayData
->
(
Text
,
Value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment