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">
<ReviewablePostHeader @reviewable={{reviewable}} @createdBy={{reviewable.created_by}} @tagName="" />
{{cook-text
reviewable.payload.raw
class="post-body"
categoryId=reviewable.category_id
topicId=reviewable.topic_id
paintOneboxes=true
opts=(hash removeMissing=true)
}}
<CookText
@rawText={{reviewable.payload.raw}}
@class="post-body"
@categoryId={{reviewable.category_id}}
@topicId={{reviewable.topic_id}}
@paintOneboxes={{true}}
@opts={{hash removeMissing=true}}
/>
{{yield}}
</div>

View File

@ -149,7 +149,7 @@
<ReviewableCreatedBy @user={{currentUser}} @tagName="" />
<div class="post-contents">
<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 class="reviewable-actions">

View File

@ -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`<CookText @rawText="_foo_" @class="post-body" />`,
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`<CookText @rawText="![an image](upload://a.png)" @class="post-body" />`,
beforeEach() {
pretender.post("/uploads/lookup-urls", () => {