From d7b766006158d3c23b3e353d5aad140e9a676b84 Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Tue, 22 Nov 2022 13:55:23 +1000 Subject: [PATCH] DEV: Minor hashtag to-markdown fix (#19142) Follow-up to 3846b6248f6ee8dac63db11da286939b6c0207cc, check if class contains hashtag-cooked rather than it being the only class. --- app/assets/javascripts/discourse/app/lib/to-markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/lib/to-markdown.js b/app/assets/javascripts/discourse/app/lib/to-markdown.js index 3effe4d0273..69be29cfa73 100644 --- a/app/assets/javascripts/discourse/app/lib/to-markdown.js +++ b/app/assets/javascripts/discourse/app/lib/to-markdown.js @@ -315,7 +315,7 @@ export class Tag { return text; } - if ("hashtag-cooked" === attr.class) { + if (attr.class?.includes("hashtag-cooked")) { if (attr["data-ref"]) { return `#${attr["data-ref"]}`; } else {