2023-02-24 04:50:52 -05:00
|
|
|
import { observes, on } from "@ember-decorators/object";
|
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
|
|
|
|
2023-02-23 10:32:53 -05:00
|
|
|
export default class HighlightedCode extends Component {
|
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);
|
2023-02-23 10:32:53 -05:00
|
|
|
}
|
|
|
|
}
|