FIX: File size text should not be part of link.

This commit is contained in:
Guo Xiang Tan 2019-06-11 15:21:06 +08:00
parent fb0a655e8a
commit e5cace9185
2 changed files with 4 additions and 4 deletions

View File

@ -444,9 +444,9 @@ export function getUploadMarkdown(upload) {
) {
return uploadLocation(upload.url);
} else {
return `[${upload.original_filename} (${I18n.toHumanSize(
upload.filesize
)})|attachment](${upload.short_url})`;
return `[${upload.original_filename}|attachment](${
upload.short_url
}) (${I18n.toHumanSize(upload.filesize)})`;
}
}

View File

@ -194,7 +194,7 @@ QUnit.test("getUploadMarkdown", assert => {
assert.equal(
testUploadMarkdown("important.txt", { short_url }),
`[important.txt (42 Bytes)|attachment](${short_url})`
`[important.txt|attachment](${short_url}) (42 Bytes)`
);
});