mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-07 15:32:11 +00:00
refactor: render highlight language (#38793)
Avoid CSS injection More details are in the comment of CodeBlockAttributes
This commit is contained in:
@@ -34,7 +34,7 @@ export function registerGlobalSelectorFunc<T extends Element>(selector: string,
|
||||
}
|
||||
}
|
||||
|
||||
// It handles the global init functions for all `<div data-global-int="initSomeElem"></div>` elements.
|
||||
// It handles the global init functions for all `<div data-global-init="initSomeElem"></div>` elements.
|
||||
export function registerGlobalInitFunc<T extends HTMLElement>(name: string, handler: GlobalInitFunc<T>) {
|
||||
globalInitFuncs[name] = handler as GlobalInitFunc<Element>;
|
||||
// The "global init" functions are managed internally and called by callGlobalInitFunc
|
||||
|
||||
Reference in New Issue
Block a user