Derped pretty hard. This passes all tests locally showdownjs/showdown#163

This commit is contained in:
Benjamin San Souci 2015-06-17 08:24:41 -07:00
parent db60389c39
commit 72167fb922
3 changed files with 6 additions and 6 deletions

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

View File

@ -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, '&quot;');
@ -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;
}