mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-19 12:56:08 +00:00
Replacing SVG with base64 encoded html+img tag for svg, closes #187
This commit is contained in:
parent
4b4c233bcb
commit
df7625e8ca
@ -43,4 +43,6 @@ chartData renderable format = do
|
||||
imgData <- readFile $ fpFromString filename
|
||||
return $ case format of
|
||||
PNG -> png width height $ base64 imgData
|
||||
SVG -> svg $ Char.unpack imgData
|
||||
SVG -> html $ makeSvgImg $ base64 imgData
|
||||
where
|
||||
makeSvgImg base64data = Char.unpack $ "<img src=\"data:image/svg+xml;base64," ++ base64data ++ "\"/>"
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@ module IHaskell.Display (
|
||||
IHaskellDisplay(..),
|
||||
plain, html, png, jpg, svg, latex,
|
||||
serializeDisplay,
|
||||
Width, Height, Base64,
|
||||
Width, Height, Base64(..),
|
||||
encode64, base64,
|
||||
Display(..),
|
||||
DisplayData(..),
|
||||
|
Loading…
x
Reference in New Issue
Block a user