From ad4694cdcdb95626f80f612941fde03aa9684546 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 29 Jun 2017 06:14:19 +0900 Subject: [PATCH] Revert "FIX: Can't cook queued posts when markdown-it is enabled." This reverts commit 5ff563cdddea6b5c96d9f2ff1f31f25eb0fdacef. --- .../javascripts/discourse/components/queued-post.js.es6 | 8 -------- .../discourse/templates/components/queued-post.hbs | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/assets/javascripts/discourse/components/queued-post.js.es6 b/app/assets/javascripts/discourse/components/queued-post.js.es6 index 1da241922d6..9629724b438 100644 --- a/app/assets/javascripts/discourse/components/queued-post.js.es6 +++ b/app/assets/javascripts/discourse/components/queued-post.js.es6 @@ -1,8 +1,6 @@ import { propertyEqual } from 'discourse/lib/computed'; -import { default as computed } from 'ember-addons/ember-computed-decorators'; import { bufferedProperty } from 'discourse/mixins/buffered-content'; import { popupAjaxError } from 'discourse/lib/ajax-error'; -import { cookAsync } from 'discourse/lib/text'; function updateState(state, opts) { opts = opts || {}; @@ -23,12 +21,6 @@ export default Ember.Component.extend(bufferedProperty('post'), { editing: propertyEqual('post', 'currentlyEditing'), _confirmDelete: updateState('rejected', {deleteUser: true}), - @computed('post.raw') - cooked(raw) { - cookAsync(raw).then(cooked => this.set('cooked', cooked)); - return raw; - }, - actions: { approve: updateState('approved'), reject: updateState('rejected'), diff --git a/app/assets/javascripts/discourse/templates/components/queued-post.hbs b/app/assets/javascripts/discourse/templates/components/queued-post.hbs index 1045b1b6ba0..6ddd37b864a 100644 --- a/app/assets/javascripts/discourse/templates/components/queued-post.hbs +++ b/app/assets/javascripts/discourse/templates/components/queued-post.hbs @@ -34,7 +34,7 @@ {{#if editing}} {{d-editor value=buffered.raw}} {{else}} - {{{cooked}}} + {{{cook-text post.raw}}} {{/if}}