discourse/app/assets/javascripts/admin/components/highlighted-code.js
Robin Ward 5b2c306bb8 REFACTOR: Remove Discourse.HighlightJSPath from globals
Instead we use the session, and pass that along where necessary.
2020-08-17 15:45:44 -04:00

12 lines
345 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() {
highlightSyntax($(this.element), this.siteSettings, this.session);
}
});