kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fix for identifying SVG images by file extension
rodzic
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>
|
||||
|
|
Ładowanie…
Reference in New Issue