@nomideusz/svelte-calendar 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/text-fit.js +3 -1
- package/package.json +1 -1
package/dist/text-fit.js
CHANGED
|
@@ -53,7 +53,9 @@ export function breakLines(text, font, width) {
|
|
|
53
53
|
const measure = (s) => measureNaturalWidth(prepareWithSegments(s, font));
|
|
54
54
|
const boxes = [];
|
|
55
55
|
const glue = []; // glue[i] sits between boxes[i] and boxes[i + 1]
|
|
56
|
-
|
|
56
|
+
// Any whitespace run is one space to `white-space: normal` — a stored line
|
|
57
|
+
// break included. Only a no-break space keeps its neighbours in one box.
|
|
58
|
+
const words = text.split(/[^\S\u00a0]+/).filter(Boolean);
|
|
57
59
|
words.forEach((w, wi) => {
|
|
58
60
|
const frags = w.split(SHY);
|
|
59
61
|
frags.forEach((f, fi) => {
|