We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 698ddbd commit 7c8a09cCopy full SHA for 7c8a09c
src/layouts/Default.astro
@@ -130,12 +130,8 @@ const languageEntries = Object.entries(languages);
130
const c = formatter.formatToParts(-value, unit);
131
132
const offset = getOffset(unit);
133
- if (p[0].type === 'literal') {
134
- if (!c.length || c[0].type !== 'literal') {
135
- prefix[offset] = p[0].value.length;
136
- } else if (!c[0].value.endsWith(p[0].value)) {
137
- prefix[offset] = p[0].value.length - extractCommon(p[0].value, c[0].value, true);
138
- }
+ if (p[0].type === 'literal' && (!c.length || c[0].type !== 'literal' || !c[0].value.endsWith(p[0].value))) {
+ prefix[offset] = p[0].value.length;
139
}
140
if (p[p.length - 1].type === 'literal') {
141
if (!c.length || c[c.length - 1].type !== 'literal') {
0 commit comments