DEV: Remove attachment css handling from resolveAllShortUrls

This was moved inside the markdown processor in 65481858, so there is no longer any need to run this logic after cooking
This commit is contained in:
David Taylor 2020-06-05 15:12:30 +01:00
parent dc633f299f
commit 0f09fd22f3
No known key found for this signature in database
GPG Key ID: 46904C18B1D3F434
1 changed files with 0 additions and 10 deletions

View File

@ -1,5 +1,4 @@
import { debounce } from "@ember/runloop";
import { ATTACHMENT_CSS_CLASS } from "./engines/discourse-markdown-it";
let _cache = {};
export function lookupCachedUploadUrl(shortUrl) {
@ -85,15 +84,6 @@ function _loadCachedShortUrls($uploads, siteSettings) {
case "A":
retrieveCachedUrl($upload, siteSettings, "orig-href", url => {
$upload.attr("href", url);
// Replace "|attachment" with class='attachment'
// TODO: This is a part of the cooking process now and should be
// removed in the future.
const content = $upload.text().split("|");
if (content[1] === ATTACHMENT_CSS_CLASS) {
$upload.addClass(ATTACHMENT_CSS_CLASS);
$upload.text(content[0]);
}
});
break;