mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Derped pretty hard. This passes all tests locally showdownjs/showdown#163
This commit is contained in:
parent
db60389c39
commit
72167fb922
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
|
@ -45,12 +45,11 @@ showdown.subParser('images', function (text, options, globals) {
|
|||
var isPDF = url.indexOf('.pdf') === url.length - 4,
|
||||
result = '';
|
||||
|
||||
if (isPDF)
|
||||
if (isPDF) {
|
||||
result = '<object data="' + url + '" type="application/pdf"';
|
||||
else
|
||||
} else {
|
||||
result = '<img src="' + url + '" alt="' + altText + '"';
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (title) {
|
||||
title = title.replace(/"/g, '"');
|
||||
|
@ -66,10 +65,11 @@ showdown.subParser('images', function (text, options, globals) {
|
|||
result += ' height="' + height + '"';
|
||||
}
|
||||
|
||||
if (isPDF)
|
||||
if (isPDF) {
|
||||
result += '>' + altText + '</object>';
|
||||
else
|
||||
} else {
|
||||
result += ' />';
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user