add linebreaks when uploading a file
This commit is contained in:
parent
0634834009
commit
c4f93846f9
|
@ -269,7 +269,7 @@ Discourse.Utilities = {
|
|||
// is Audio/Video
|
||||
return Discourse.Utilities.uploadLocation(upload.url);
|
||||
} else {
|
||||
return '<a class="attachment" href="' + upload.url + '">' + upload.original_filename + '</a> (' + I18n.toHumanSize(upload.filesize) + ')';
|
||||
return '<a class="attachment" href="' + upload.url + '">' + upload.original_filename + '</a> (' + I18n.toHumanSize(upload.filesize) + ')\n';
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ var getUploadMarkdown = function(filename) {
|
|||
|
||||
test("getUploadMarkdown", function() {
|
||||
ok(getUploadMarkdown("lolcat.gif") === '<img src="/uploads/123/abcdef.ext" width="100" height="200">');
|
||||
ok(getUploadMarkdown("important.txt") === '<a class="attachment" href="/uploads/123/abcdef.ext">important.txt</a> (42 Bytes)');
|
||||
ok(getUploadMarkdown("important.txt") === '<a class="attachment" href="/uploads/123/abcdef.ext">important.txt</a> (42 Bytes)\n');
|
||||
});
|
||||
|
||||
test("isAnImage", function() {
|
||||
|
|
Loading…
Reference in New Issue