Disable optimization for terminal template

This commit is contained in:
lowlighter
2020-10-24 20:30:34 +02:00
parent 09391f3923
commit 9f3f1155d5
4 changed files with 8 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@@ -49,7 +49,7 @@
console.debug(`metrics/compute/${login} > render > success`)
//Optimize rendering
if (conf.optimize) {
if ((conf.optimize)&&(!q.raw)) {
console.debug(`metrics/compute/${login} > optimize`)
const svgo = new SVGO({full:true, plugins:[{cleanupAttrs:true}, {inlineStyles:false}]})
const {data:optimized} = await svgo.optimize(rendered)

View File

@@ -3,5 +3,6 @@
/** Template processor */
export default async function ({login, q}, {conf, data, rest, graphql, plugins}, {s, pending, imports}) {
await common(...arguments)
//Common
await common(...arguments)
}

View File

@@ -3,5 +3,8 @@
/** Template processor */
export default async function ({login, q}, {conf, data, rest, graphql, plugins}, {s, pending, imports}) {
await common(...arguments)
//Common
await common(...arguments)
//Disable optimization to keep white-spaces
q.raw = true
}