mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add acceptance tests for custom-html
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { registerHelper } from 'discourse-common/lib/helpers';
|
||||
import PreloadStore from 'preload-store';
|
||||
|
||||
const _customizations = {};
|
||||
let _customizations = {};
|
||||
|
||||
export function getCustomHTML(key) {
|
||||
const c = _customizations[key];
|
||||
@@ -15,6 +15,10 @@ export function getCustomHTML(key) {
|
||||
}
|
||||
}
|
||||
|
||||
export function clearHTMLCache() {
|
||||
_customizations = {};
|
||||
}
|
||||
|
||||
// Set a fragment of HTML by key. It can then be looked up with `getCustomHTML(key)`.
|
||||
export function setCustomHTML(key, html) {
|
||||
_customizations[key] = html;
|
||||
|
||||
Reference in New Issue
Block a user