From 7343cb9f7394bd2f0b84adaef41eb432118c18cb Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 30 Jun 2022 14:03:27 +0200 Subject: [PATCH] DEV: Convert `{{cook-text}}` to angle-brackets (#17287) --- .../components/reviewable-queued-post.hbs | 16 ++++++++-------- .../discourse/app/templates/topic.hbs | 2 +- .../integration/components/cook-text-test.js | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/discourse/app/templates/components/reviewable-queued-post.hbs b/app/assets/javascripts/discourse/app/templates/components/reviewable-queued-post.hbs index 587ec2f3d4a..ffd2173a99d 100644 --- a/app/assets/javascripts/discourse/app/templates/components/reviewable-queued-post.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/reviewable-queued-post.hbs @@ -18,14 +18,14 @@
- {{cook-text - reviewable.payload.raw - class="post-body" - categoryId=reviewable.category_id - topicId=reviewable.topic_id - paintOneboxes=true - opts=(hash removeMissing=true) - }} + {{yield}}
diff --git a/app/assets/javascripts/discourse/app/templates/topic.hbs b/app/assets/javascripts/discourse/app/templates/topic.hbs index 58a69497400..769a463990d 100644 --- a/app/assets/javascripts/discourse/app/templates/topic.hbs +++ b/app/assets/javascripts/discourse/app/templates/topic.hbs @@ -149,7 +149,7 @@
-
{{cook-text pending.raw}}
+
diff --git a/app/assets/javascripts/discourse/tests/integration/components/cook-text-test.js b/app/assets/javascripts/discourse/tests/integration/components/cook-text-test.js index 3bc2973103b..391a4446dec 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/cook-text-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/cook-text-test.js @@ -10,7 +10,7 @@ discourseModule("Integration | Component | cook-text", function (hooks) { setupRenderingTest(hooks); componentTest("renders markdown", { - template: hbs`{{cook-text "_foo_" class="post-body"}}`, + template: hbs``, test(assert) { const html = query(".post-body").innerHTML.trim(); @@ -19,7 +19,7 @@ discourseModule("Integration | Component | cook-text", function (hooks) { }); componentTest("resolves short URLs", { - template: hbs`{{cook-text "![an image](upload://a.png)" class="post-body"}}`, + template: hbs``, beforeEach() { pretender.post("/uploads/lookup-urls", () => {