1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 05:38:26 -04:00

set conservativeCollapse to true when minifying lit templates

This commit is contained in:
Jake Jarvis 2021-07-28 11:25:19 -04:00
parent 574ea65d8d
commit 8582d340b8
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
2 changed files with 3 additions and 2 deletions

View File

@ -34,8 +34,8 @@ if (wrapper) {
})()}
${(() => {
if (repo.stars > 0) {
const starsPlural = repo.stars === 1 ? "star" : "stars";
const starsComma = numeral(repo.stars).format("0,0");
const starsPlural = repo.stars === 1 ? "star" : "stars";
return html`<div class="repo-meta" title="${starsComma} ${starsPlural}">
<svg viewBox="0 0 16 16" height="16" width="16">
@ -50,8 +50,8 @@ if (wrapper) {
})()}
${(() => {
if (repo.forks > 0) {
const forksPlural = repo.forks === 1 ? "fork" : "forks";
const forksComma = numeral(repo.forks).format("0,0");
const forksPlural = repo.forks === 1 ? "fork" : "forks";
return html`<div class="repo-meta" title="${forksComma} ${forksPlural}">
<svg viewBox="0 0 16 16" height="16" width="16">

View File

@ -106,6 +106,7 @@ GitHub: https://github.com/jakejarvis/jarv.is`,
htmlMinifier: {
html5: true,
collapseWhitespace: true,
conservativeCollapse: true,
removeComments: false,
caseSensitive: true,
},