discourse/app/assets/javascripts/admin/components/highlighted-code.js

Failed to ignore revisions in .git-blame-ignore-revs.

12 lines
322 B
JavaScript
Raw Normal View History

import Component from "@ember/component";
import { on, observes } from "discourse-common/utils/decorators";
2018-06-15 11:03:24 -04:00
import highlightSyntax from "discourse/lib/highlight-syntax";
export default Component.extend({
2018-06-15 11:03:24 -04:00
@on("didInsertElement")
@observes("code")
_refresh: function() {
highlightSyntax($(this.element));
}
});