mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 14:29:38 +08:00

This conversion was achieved using the ember-native-class-codemod, plus a handful of manual fixes/tweaks
12 lines
363 B
JavaScript
12 lines
363 B
JavaScript
import { observes, on } from "discourse-common/utils/decorators";
|
|
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);
|
|
}
|
|
}
|