mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
Address a bug in the word counter regex
This commit is contained in:
parent
630451c161
commit
20656170d0
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@
|
||||||
if (counter === "char") {
|
if (counter === "char") {
|
||||||
count = value.length;
|
count = value.length;
|
||||||
} else if (counter === "word") {
|
} else if (counter === "word") {
|
||||||
count = value.split(/\b/).length - 1;
|
count = value.split(/\b\w+\b/).length - 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue