diff --git a/docs/api/index.html b/docs/api/index.html
index fffb4f7..741eff1 100644
--- a/docs/api/index.html
+++ b/docs/api/index.html
@@ -5,7 +5,7 @@
use-bootstrap-tag | Tag input for Bootstrap 5
-
+
diff --git a/docs/assets/index-eef3aa50.js b/docs/assets/index-fb4865c6.js
similarity index 99%
rename from docs/assets/index-eef3aa50.js
rename to docs/assets/index-fb4865c6.js
index bd744e5..35edfbe 100644
--- a/docs/assets/index-eef3aa50.js
+++ b/docs/assets/index-fb4865c6.js
@@ -227,4 +227,4 @@ import UseBootstrapTag from 'use-bootstrap-tag'
style, so anything you change in bootstrap automatically changes
use-bootstrap-tag style as well. Read more about customize bootstrap styles
at https://getbootstrap.com/docs/5.3/customize/sass/ . `},m(e,s){nt(e,t,s)},p:tt,i:tt,o:tt,d(e){e&&et(t)}}}function uh(n){return Rn(()=>{Pn.highlightAll()}),[]}class dh extends ye{constructor(t){super(),Ee(this,t,uh,ch,_e,{})}}function ph(n){let t,e;return{c(){t=st("svg"),e=st("path"),i(e,"d","M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"),i(t,"viewBox","0 0 24 24"),i(t,"width","1em"),i(t,"height","1em"),i(t,"stroke","currentColor"),i(t,"stroke-width","2"),i(t,"fill","none"),i(t,"stroke-linecap","round"),i(t,"stroke-linejoin","round")},m(s,a){nt(s,t,a),o(t,e)},d(s){s&&et(t)}}}function fh(n){let t,e,s,a,r,c,l,d,f,u;return{c(){t=st("svg"),e=st("circle"),s=st("line"),a=st("line"),r=st("line"),c=st("line"),l=st("line"),d=st("line"),f=st("line"),u=st("line"),i(e,"cx","12"),i(e,"cy","12"),i(e,"r","5"),i(s,"x1","12"),i(s,"y1","1"),i(s,"x2","12"),i(s,"y2","3"),i(a,"x1","12"),i(a,"y1","21"),i(a,"x2","12"),i(a,"y2","23"),i(r,"x1","4.22"),i(r,"y1","4.22"),i(r,"x2","5.64"),i(r,"y2","5.64"),i(c,"x1","18.36"),i(c,"y1","18.36"),i(c,"x2","19.78"),i(c,"y2","19.78"),i(l,"x1","1"),i(l,"y1","12"),i(l,"x2","3"),i(l,"y2","12"),i(d,"x1","21"),i(d,"y1","12"),i(d,"x2","23"),i(d,"y2","12"),i(f,"x1","4.22"),i(f,"y1","19.78"),i(f,"x2","5.64"),i(f,"y2","18.36"),i(u,"x1","18.36"),i(u,"y1","5.64"),i(u,"x2","19.78"),i(u,"y2","4.22"),i(t,"viewBox","0 0 24 24"),i(t,"width","1em"),i(t,"height","1em"),i(t,"stroke","currentColor"),i(t,"stroke-width","2"),i(t,"fill","none"),i(t,"stroke-linecap","round"),i(t,"stroke-linejoin","round")},m(b,E){nt(b,t,E),o(t,e),o(t,s),o(t,a),o(t,r),o(t,c),o(t,l),o(t,d),o(t,f),o(t,u)},d(b){b&&et(t)}}}function hh(n){let t,e,s,a,r,c,l,d,f,u,b,E,T,k,y,A,C,g,h,m,v,_,x,O,S,L,N,P,M,z,F,q,U,B,K,J,H,j,D,R;function V(W,G){return W[0]==="light"?fh:ph}let Z=V(n),Y=Z(n);var X=n[3][n[1]];function rt(W,G){return{}}return X&&(H=wr(X,rt())),{c(){t=p("nav"),e=p("div"),s=p("a"),a=st("svg"),r=st("path"),c=st("path"),l=$(),d=qs(ei),f=$(),u=p("div"),b=p("a"),b.innerHTML=' ',E=$(),T=p("label"),Y.c(),k=$(),y=p("input"),A=$(),C=p("div"),g=p("div"),h=p("ul"),m=p("li"),v=p("a"),v.textContent="Home",_=$(),x=p("li"),O=p("a"),O.textContent="Install",S=$(),L=p("li"),N=p("a"),N.textContent="Demo",P=$(),M=p("li"),z=p("a"),z.textContent="API",F=$(),q=p("li"),U=p("a"),U.textContent="Customize",B=$(),K=p("div"),J=p("div"),H&&$r(H.$$.fragment),i(r,"d","M3 2v4.586l7 7L14.586 9l-7-7H3zM2 2a1 1 0 0 1 1-1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 2 6.586V2z"),i(c,"d","M5.5 5a.5.5 0 1 1 0-1 .5.5 0 0 1 0 1zm0 1a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM1 7.086a1 1 0 0 0 .293.707L8.75 15.25l-.043.043a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 0 7.586V3a1 1 0 0 1 1-1v5.086z"),i(a,"xmlns","http://www.w3.org/2000/svg"),i(a,"width","1em"),i(a,"height","1em"),i(a,"fill","currentColor"),i(a,"viewBox","0 0 16 16"),i(s,"class","navbar-brand d-flex align-items-center gap-2"),i(s,"href","/"),i(b,"class","fs-5 nav-link p-0"),i(b,"href",ka),i(b,"target","_blank"),i(T,"class","btn nav-link p-0 border-0 fs-5"),i(T,"for","bs-theme"),i(T,"title","Toggle color schema"),i(y,"type","checkbox"),i(y,"class","btn-check"),i(y,"id","bs-theme"),i(y,"autocomplete","off"),i(u,"class","ms-auto navbar-nav align-items-center gap-3"),i(e,"class","container justify-content-start"),i(t,"class","navbar navbar-expand bg-body-tertiary sticky-top"),i(t,"data-bs-theme","dark"),i(v,"class","nav-link"),i(v,"href","/"),Q(v,"active",n[1]==="/"),i(m,"class","nav-item"),i(O,"class","nav-link"),i(O,"href","/install"),Q(O,"active",n[1]==="/install"),i(x,"class","nav-item"),i(N,"class","nav-link"),i(N,"href","/demo"),Q(N,"active",n[1]==="/demo"),i(L,"class","nav-item"),i(z,"class","nav-link"),i(z,"href","/api"),Q(z,"active",n[1]==="/api"),i(M,"class","nav-item"),i(U,"class","nav-link"),i(U,"href","/customize"),Q(U,"active",n[1]==="/customize"),i(q,"class","nav-item"),i(h,"class","nav nav-tabs"),Ps(h,"margin-bottom","-1px"),i(g,"class","container pt-3"),i(C,"class","bg-body-tertiary"),Ps(C,"border-bottom","var(--bs-border-width) solid var(--bs-border-color)"),i(J,"class","pt-4"),i(K,"class","container py-3")},m(W,G){nt(W,t,G),o(t,e),o(e,s),o(s,a),o(a,r),o(a,c),o(s,l),o(s,d),o(e,f),o(e,u),o(u,b),o(u,E),o(u,T),Y.m(T,null),o(u,k),o(u,y),nt(W,A,G),nt(W,C,G),o(C,g),o(g,h),o(h,m),o(m,v),o(h,_),o(h,x),o(x,O),o(h,S),o(h,L),o(L,N),o(h,P),o(h,M),o(M,z),o(h,F),o(h,q),o(q,U),nt(W,B,G),nt(W,K,G),o(K,J),H&&La(H,J,null),j=!0,D||(R=ct(y,"change",n[2]),D=!0)},p(W,[G]){if(Z!==(Z=V(W))&&(Y.d(1),Y=Z(W),Y&&(Y.c(),Y.m(T,null))),(!j||G&2)&&Q(v,"active",W[1]==="/"),(!j||G&2)&&Q(O,"active",W[1]==="/install"),(!j||G&2)&&Q(N,"active",W[1]==="/demo"),(!j||G&2)&&Q(z,"active",W[1]==="/api"),(!j||G&2)&&Q(U,"active",W[1]==="/customize"),G&2&&X!==(X=W[3][W[1]])){if(H){vf();const lt=H;Cr(lt.$$.fragment,1,0,()=>{Na(lt,1)}),_f()}X?(H=wr(X,rt()),$r(H.$$.fragment),on(H.$$.fragment,1),La(H,J,null)):H=null}},i(W){j||(H&&on(H.$$.fragment,W),j=!0)},o(W){H&&Cr(H.$$.fragment,W),j=!1},d(W){W&&(et(t),et(A),et(C),et(B),et(K)),Y.d(),H&&Na(H),D=!1,R()}}}function gh(n,t,e){let s="light";function a(d){e(0,s=d.target.checked?"dark":"light")}let r="/";function c(){e(1,r=location.pathname)}xf().on("*",c).listen();const l={"/":Lf,"/install":Pf,"/demo":ih,"/api":lh,"/customize":dh};return n.$$.update=()=>{n.$$.dirty&1&&document.documentElement.setAttribute("data-bs-theme",s),n.$$.dirty&2&&r&&window.scrollTo(0,0)},[s,r,a,l]}class mh extends ye{constructor(t){super(),Ee(this,t,gh,hh,_e,{})}}window.bootstrap=Gp;Pn.manual=!0;const zo=document.getElementById("app");zo.innerHTML="";new mh({target:zo});
+ API`},m(e,s){nt(e,t,s)},p:tt,i:tt,o:tt,d(e){e&&et(t)}}}function uh(n){return Rn(()=>{Pn.highlightAll()}),[]}class dh extends ye{constructor(t){super(),Ee(this,t,uh,ch,_e,{})}}function ph(n){let t,e;return{c(){t=st("svg"),e=st("path"),i(e,"d","M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"),i(t,"viewBox","0 0 24 24"),i(t,"width","1em"),i(t,"height","1em"),i(t,"stroke","currentColor"),i(t,"stroke-width","2"),i(t,"fill","none"),i(t,"stroke-linecap","round"),i(t,"stroke-linejoin","round")},m(s,a){nt(s,t,a),o(t,e)},d(s){s&&et(t)}}}function fh(n){let t,e,s,a,r,c,l,d,f,u;return{c(){t=st("svg"),e=st("circle"),s=st("line"),a=st("line"),r=st("line"),c=st("line"),l=st("line"),d=st("line"),f=st("line"),u=st("line"),i(e,"cx","12"),i(e,"cy","12"),i(e,"r","5"),i(s,"x1","12"),i(s,"y1","1"),i(s,"x2","12"),i(s,"y2","3"),i(a,"x1","12"),i(a,"y1","21"),i(a,"x2","12"),i(a,"y2","23"),i(r,"x1","4.22"),i(r,"y1","4.22"),i(r,"x2","5.64"),i(r,"y2","5.64"),i(c,"x1","18.36"),i(c,"y1","18.36"),i(c,"x2","19.78"),i(c,"y2","19.78"),i(l,"x1","1"),i(l,"y1","12"),i(l,"x2","3"),i(l,"y2","12"),i(d,"x1","21"),i(d,"y1","12"),i(d,"x2","23"),i(d,"y2","12"),i(f,"x1","4.22"),i(f,"y1","19.78"),i(f,"x2","5.64"),i(f,"y2","18.36"),i(u,"x1","18.36"),i(u,"y1","5.64"),i(u,"x2","19.78"),i(u,"y2","4.22"),i(t,"viewBox","0 0 24 24"),i(t,"width","1em"),i(t,"height","1em"),i(t,"stroke","currentColor"),i(t,"stroke-width","2"),i(t,"fill","none"),i(t,"stroke-linecap","round"),i(t,"stroke-linejoin","round")},m(b,E){nt(b,t,E),o(t,e),o(t,s),o(t,a),o(t,r),o(t,c),o(t,l),o(t,d),o(t,f),o(t,u)},d(b){b&&et(t)}}}function hh(n){let t,e,s,a,r,c,l,d,f,u,b,E,T,k,y,A,C,g,h,m,v,_,x,O,S,L,N,P,M,z,F,q,U,B,K,J,H,j,D,R;function V(W,G){return W[0]==="light"?fh:ph}let Z=V(n),Y=Z(n);var X=n[3][n[1]];function rt(W,G){return{}}return X&&(H=wr(X,rt())),{c(){t=p("nav"),e=p("div"),s=p("a"),a=st("svg"),r=st("path"),c=st("path"),l=$(),d=qs(ei),f=$(),u=p("div"),b=p("a"),b.innerHTML=' ',E=$(),T=p("label"),Y.c(),k=$(),y=p("input"),A=$(),C=p("div"),g=p("div"),h=p("ul"),m=p("li"),v=p("a"),v.textContent="Home",_=$(),x=p("li"),O=p("a"),O.textContent="Install",S=$(),L=p("li"),N=p("a"),N.textContent="Demo",P=$(),M=p("li"),z=p("a"),z.textContent="API",F=$(),q=p("li"),U=p("a"),U.textContent="Customize",B=$(),K=p("div"),J=p("div"),H&&$r(H.$$.fragment),i(r,"d","M3 2v4.586l7 7L14.586 9l-7-7H3zM2 2a1 1 0 0 1 1-1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 2 6.586V2z"),i(c,"d","M5.5 5a.5.5 0 1 1 0-1 .5.5 0 0 1 0 1zm0 1a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM1 7.086a1 1 0 0 0 .293.707L8.75 15.25l-.043.043a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 0 7.586V3a1 1 0 0 1 1-1v5.086z"),i(a,"xmlns","http://www.w3.org/2000/svg"),i(a,"width","1em"),i(a,"height","1em"),i(a,"fill","currentColor"),i(a,"viewBox","0 0 16 16"),i(s,"class","navbar-brand d-flex align-items-center gap-2"),i(s,"href","/"),i(b,"class","fs-5 nav-link p-0"),i(b,"href",ka),i(b,"target","_blank"),i(T,"class","btn nav-link p-0 border-0 fs-5"),i(T,"for","bs-theme"),i(T,"title","Toggle color schema"),i(y,"type","checkbox"),i(y,"class","btn-check"),i(y,"id","bs-theme"),i(y,"autocomplete","off"),i(u,"class","ms-auto navbar-nav align-items-center gap-3"),i(e,"class","container justify-content-start"),i(t,"class","navbar navbar-expand bg-body-tertiary sticky-top"),i(t,"data-bs-theme","dark"),i(v,"class","nav-link"),i(v,"href","/"),Q(v,"active",n[1]==="/"),i(m,"class","nav-item"),i(O,"class","nav-link"),i(O,"href","/install"),Q(O,"active",n[1]==="/install"),i(x,"class","nav-item"),i(N,"class","nav-link"),i(N,"href","/demo"),Q(N,"active",n[1]==="/demo"),i(L,"class","nav-item"),i(z,"class","nav-link"),i(z,"href","/api"),Q(z,"active",n[1]==="/api"),i(M,"class","nav-item"),i(U,"class","nav-link"),i(U,"href","/customize"),Q(U,"active",n[1]==="/customize"),i(q,"class","nav-item"),i(h,"class","nav nav-tabs"),Ps(h,"margin-bottom","-1px"),i(g,"class","container pt-3"),i(C,"class","bg-body-tertiary"),Ps(C,"border-bottom","var(--bs-border-width) solid var(--bs-border-color)"),i(J,"class","pt-4"),i(K,"class","container py-3")},m(W,G){nt(W,t,G),o(t,e),o(e,s),o(s,a),o(a,r),o(a,c),o(s,l),o(s,d),o(e,f),o(e,u),o(u,b),o(u,E),o(u,T),Y.m(T,null),o(u,k),o(u,y),nt(W,A,G),nt(W,C,G),o(C,g),o(g,h),o(h,m),o(m,v),o(h,_),o(h,x),o(x,O),o(h,S),o(h,L),o(L,N),o(h,P),o(h,M),o(M,z),o(h,F),o(h,q),o(q,U),nt(W,B,G),nt(W,K,G),o(K,J),H&&La(H,J,null),j=!0,D||(R=ct(y,"change",n[2]),D=!0)},p(W,[G]){if(Z!==(Z=V(W))&&(Y.d(1),Y=Z(W),Y&&(Y.c(),Y.m(T,null))),(!j||G&2)&&Q(v,"active",W[1]==="/"),(!j||G&2)&&Q(O,"active",W[1]==="/install"),(!j||G&2)&&Q(N,"active",W[1]==="/demo"),(!j||G&2)&&Q(z,"active",W[1]==="/api"),(!j||G&2)&&Q(U,"active",W[1]==="/customize"),G&2&&X!==(X=W[3][W[1]])){if(H){vf();const lt=H;Cr(lt.$$.fragment,1,0,()=>{Na(lt,1)}),_f()}X?(H=wr(X,rt()),$r(H.$$.fragment),on(H.$$.fragment,1),La(H,J,null)):H=null}},i(W){j||(H&&on(H.$$.fragment,W),j=!0)},o(W){H&&Cr(H.$$.fragment,W),j=!1},d(W){W&&(et(t),et(A),et(C),et(B),et(K)),Y.d(),H&&Na(H),D=!1,R()}}}function gh(n,t,e){let s="light";function a(d){e(0,s=d.target.checked?"dark":"light")}let r="/";function c(){let d=location.pathname;d!=="/"&&d.endsWith("/")&&(d=d.slice(0,-1)),e(1,r=d)}xf().on("*",c).listen();const l={"/":Lf,"/install":Pf,"/demo":ih,"/api":lh,"/customize":dh};return n.$$.update=()=>{n.$$.dirty&1&&document.documentElement.setAttribute("data-bs-theme",s),n.$$.dirty&2&&r&&window.scrollTo(0,0)},[s,r,a,l]}class mh extends ye{constructor(t){super(),Ee(this,t,gh,hh,_e,{})}}window.bootstrap=Gp;Pn.manual=!0;const zo=document.getElementById("app");zo.innerHTML="";new mh({target:zo});
diff --git a/docs/customize/index.html b/docs/customize/index.html
index 72b3deb..1748f4b 100644
--- a/docs/customize/index.html
+++ b/docs/customize/index.html
@@ -5,7 +5,7 @@
use-bootstrap-tag | Tag input for Bootstrap 5
-
+
diff --git a/docs/demo/index.html b/docs/demo/index.html
index d4d7189..51712c2 100644
--- a/docs/demo/index.html
+++ b/docs/demo/index.html
@@ -5,7 +5,7 @@
use-bootstrap-tag | Tag input for Bootstrap 5
-
+
diff --git a/docs/index.html b/docs/index.html
index cff82ff..4fe9793 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -5,7 +5,7 @@
use-bootstrap-tag | Tag input for Bootstrap 5
-
+
diff --git a/docs/install/index.html b/docs/install/index.html
index 3fda140..b995b21 100644
--- a/docs/install/index.html
+++ b/docs/install/index.html
@@ -5,7 +5,7 @@
use-bootstrap-tag | Tag input for Bootstrap 5
-
+
diff --git a/src/docs/docs.svelte b/src/docs/docs.svelte
index a615f4b..e3c8394 100644
--- a/src/docs/docs.svelte
+++ b/src/docs/docs.svelte
@@ -22,7 +22,11 @@
path && window.scrollTo(0, 0)
}
function update() {
- path = location.pathname
+ let pathname = location.pathname
+ if (pathname !== '/' && pathname.endsWith('/')) {
+ pathname = pathname.slice(0, -1)
+ }
+ path = pathname
}
navaid().on('*', update).listen()