REFACTOR: Remove Discourse.HighlightJSPath from globals
Instead we use the session, and pass that along where necessary.
This commit is contained in:
@@ -5,7 +5,7 @@ import highlightSyntax from "discourse/lib/highlight-syntax";
|
||||
export default Component.extend({
|
||||
@on("didInsertElement")
|
||||
@observes("code")
|
||||
_refresh: function() {
|
||||
highlightSyntax($(this.element), this.siteSettings);
|
||||
_refresh() {
|
||||
highlightSyntax($(this.element), this.siteSettings, this.session);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -313,7 +313,7 @@ const Theme = RestModel.extend({
|
||||
}
|
||||
);
|
||||
// TODO: Models shouldn't be updating the DOM
|
||||
highlightSyntax(undefined, this.siteSettings);
|
||||
highlightSyntax(undefined, this.siteSettings, this.session);
|
||||
} else {
|
||||
return this.save({ remote_update: true }).then(() =>
|
||||
this.set("changed", false)
|
||||
|
||||
Reference in New Issue
Block a user