diff --git a/src/Panel.vue b/src/Panel.vue index 532f560d..f6d4aa47 100644 --- a/src/Panel.vue +++ b/src/Panel.vue @@ -81,8 +81,6 @@ import md from './utils/markdown.js' import panelSwitch from './PanelSwitch.vue' import retriever from './Retriever.vue' - - const string = require('string'); export default { components: { @@ -299,7 +297,7 @@ if (this.headerContent) { const panelHeaderText = jQuery(this.headerContent).wrap('
').parent().find(':header').text(); if (panelHeaderText) { - this.$refs.cardContainer.setAttribute('id', string(panelHeaderText).slugify().toString()); + this.$refs.cardContainer.setAttribute('id', String(panelHeaderText).trim().toLowerCase().replace(/\s+/g, '-')); } } else if (this.$refs.headerWrapper.innerHTML) { const header = jQuery(this.$refs.headerWrapper.innerHTML).wrap('
').parent().find(':header');