fix: prepend tabber ID with prefix to avoid conflict with existing header

This commit is contained in:
alistair3149 2024-06-03 13:20:45 -04:00
parent d4fd1d2f6e
commit d150b9e3e9
No known key found for this signature in database

View file

@ -52,7 +52,7 @@ class Hash {
* @return {string} - A unique hash created from the title text. * @return {string} - A unique hash created from the title text.
*/ */
static build( titleText ) { static build( titleText ) {
let hash = mw.util.escapeIdForAttribute( titleText ); let hash = `tabber-${ mw.util.escapeIdForAttribute( titleText ) }`;
if ( Hash.exists( hash ) ) { if ( Hash.exists( hash ) ) {
hash = Hash.makeUnique( hash ); hash = Hash.makeUnique( hash );