discourse/app/assets/javascripts/admin/components/highlighted-code.js
David Taylor 7d300006a1
Revert "PERF: Move highlightjs to a background worker, and add result cache (#10191)"
This caused a CORS error when used with S3 asset storage

This reverts commit d09f283e91.
2020-07-15 13:52:35 +01:00

12 lines
322 B
JavaScript

import Component from "@ember/component";
import { on, observes } from "discourse-common/utils/decorators";
import highlightSyntax from "discourse/lib/highlight-syntax";
export default Component.extend({
@on("didInsertElement")
@observes("code")
_refresh: function() {
highlightSyntax($(this.element));
}
});