mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user