discourse/app/assets/javascripts/admin/addon/components/highlighted-code.js
Jarek Radosz 04659b0e41
DEV: Fix decorator deprecations (#20438)
…and correctly fix the decorateCookedElement id arg
2023-02-24 10:50:52 +01:00

12 lines
354 B
JavaScript

import { observes, on } from "@ember-decorators/object";
import Component from "@ember/component";
import highlightSyntax from "discourse/lib/highlight-syntax";
export default class HighlightedCode extends Component {
@on("didInsertElement")
@observes("code")
_refresh() {
highlightSyntax(this.element, this.siteSettings, this.session);
}
}