DEV: Convert `{{cook-text}}` to angle-brackets (#17287)

This commit is contained in:
Jarek Radosz 2022-06-30 14:03:27 +02:00 committed by GitHub
parent 16ea7ab248
commit 7343cb9f73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View File

@ -18,14 +18,14 @@
<div class="post-contents"> <div class="post-contents">
<ReviewablePostHeader @reviewable={{reviewable}} @createdBy={{reviewable.created_by}} @tagName="" /> <ReviewablePostHeader @reviewable={{reviewable}} @createdBy={{reviewable.created_by}} @tagName="" />
{{cook-text <CookText
reviewable.payload.raw @rawText={{reviewable.payload.raw}}
class="post-body" @class="post-body"
categoryId=reviewable.category_id @categoryId={{reviewable.category_id}}
topicId=reviewable.topic_id @topicId={{reviewable.topic_id}}
paintOneboxes=true @paintOneboxes={{true}}
opts=(hash removeMissing=true) @opts={{hash removeMissing=true}}
}} />
{{yield}} {{yield}}
</div> </div>

View File

@ -149,7 +149,7 @@
<ReviewableCreatedBy @user={{currentUser}} @tagName="" /> <ReviewableCreatedBy @user={{currentUser}} @tagName="" />
<div class="post-contents"> <div class="post-contents">
<ReviewableCreatedByName @user={{currentUser}} @tagName="" /> <ReviewableCreatedByName @user={{currentUser}} @tagName="" />
<div class="post-body">{{cook-text pending.raw}}</div> <div class="post-body"><CookText @rawText={{pending.raw}} /></div>
</div> </div>
</div> </div>
<div class="reviewable-actions"> <div class="reviewable-actions">

View File

@ -10,7 +10,7 @@ discourseModule("Integration | Component | cook-text", function (hooks) {
setupRenderingTest(hooks); setupRenderingTest(hooks);
componentTest("renders markdown", { componentTest("renders markdown", {
template: hbs`{{cook-text "_foo_" class="post-body"}}`, template: hbs`<CookText @rawText="_foo_" @class="post-body" />`,
test(assert) { test(assert) {
const html = query(".post-body").innerHTML.trim(); const html = query(".post-body").innerHTML.trim();
@ -19,7 +19,7 @@ discourseModule("Integration | Component | cook-text", function (hooks) {
}); });
componentTest("resolves short URLs", { componentTest("resolves short URLs", {
template: hbs`{{cook-text "![an image](upload://a.png)" class="post-body"}}`, template: hbs`<CookText @rawText="![an image](upload://a.png)" @class="post-body" />`,
beforeEach() { beforeEach() {
pretender.post("/uploads/lookup-urls", () => { pretender.post("/uploads/lookup-urls", () => {