mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Fix for identifying SVG images by file extension
This commit is contained in:
parent
9b8795856b
commit
505c332123
@ -20,7 +20,7 @@ var ImageParser = function(options) {
|
||||
|
||||
ImageParser.prototype.parse = function(type,text) {
|
||||
var src;
|
||||
if(type === "image/svg+xml") {
|
||||
if(type === "image/svg+xml" || type === ".svg") {
|
||||
src = "data:" + type + "," + encodeURIComponent(text);
|
||||
} else {
|
||||
src = "data:" + type + ";base64," + text;
|
||||
|
@ -26,7 +26,7 @@ $$$
|
||||
|
||||
This renders as:
|
||||
|
||||
$$$image/svg+xml
|
||||
$$$.svg
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100">
|
||||
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red" />
|
||||
</svg>
|
||||
|
Loading…
Reference in New Issue
Block a user