2019-10-23 12:30:52 -04:00
|
|
|
import Component from "@ember/component";
|
2019-11-07 16:38:28 -05:00
|
|
|
import { on, observes } from "discourse-common/utils/decorators";
|
2018-06-15 11:03:24 -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({
|
2018-06-15 11:03:24 -04:00
|
|
|
@on("didInsertElement")
|
|
|
|
@observes("code")
|
2015-08-20 13:43:12 -04:00
|
|
|
_refresh: function() {
|
2019-07-16 06:45:15 -04:00
|
|
|
highlightSyntax($(this.element));
|
2015-08-20 13:43:12 -04:00
|
|
|
}
|
|
|
|
});
|