@vaadin-component-factory/vcf-anchor-nav
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "@vaadin-component-factory/vcf-anchor-nav", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Component with tabs used as anchor navigation and content sections. Automates the linking of tabs and sections.", | ||
@@ -5,0 +5,0 @@ "main": "theme/lumo/vcf-anchor-nav.js", |
@@ -119,3 +119,3 @@ /** | ||
static get version() { | ||
return '0.2.0'; | ||
return '0.2.1'; | ||
} | ||
@@ -181,3 +181,8 @@ | ||
section.name = section.name || `Section ${i + 1}`; | ||
section.id = section.id || section.name.replace(/ /g, '-').toLowerCase(); | ||
section.id = | ||
section.id || | ||
section.name | ||
.replace(/[^a-zA-Z- ]/g, '') | ||
.replace(/ /g, '-') | ||
.toLowerCase(); | ||
a.innerText = section.name; | ||
@@ -184,0 +189,0 @@ a.id = `${section.id}-anchor`; |
172337
1830