2019-10-23 12:30:52 -04:00
|
|
|
import Component from "@ember/component";
|
2020-07-15 08:52:35 -04:00
|
|
|
import { on, observes } from "discourse-common/utils/decorators";
|
|
|
|
import highlightSyntax from "discourse/lib/highlight-syntax";
|
2015-08-20 13:43:12 -04:00
|
|
|
|
2019-10-23 12:30:52 -04:00
|
|
|
export default Component.extend({
|
2020-07-15 08:52:35 -04:00
|
|
|
@on("didInsertElement")
|
|
|
|
@observes("code")
|
2020-08-17 15:44:39 -04:00
|
|
|
_refresh() {
|
|
|
|
highlightSyntax($(this.element), this.siteSettings, this.session);
|
2015-08-20 13:43:12 -04:00
|
|
|
}
|
|
|
|
});
|