2020-07-15 08:52:35 -04:00
|
|
|
import { observes, on } from "discourse-common/utils/decorators";
|
2019-10-23 12:30:52 -04:00
|
|
|
import Component from "@ember/component";
|
2020-07-15 08:52:35 -04:00
|
|
|
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() {
|
2020-09-01 03:50:49 -04:00
|
|
|
highlightSyntax(this.element, this.siteSettings, this.session);
|
2015-08-20 13:43:12 -04:00
|
|
|
},
|
|
|
|
});
|