From e0e1e97de97dad7bf29ea5cf790393c85039c30b Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Thu, 10 Oct 2019 11:46:04 +0200 Subject: [PATCH] Ne pas arrondir les constantes dans la documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C'était perturbant d'afficher un taux à 0,03% alors que la valeur utilisée est 0,024% --- source/engine/parse.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/engine/parse.js b/source/engine/parse.js index e71054080..86847c89a 100644 --- a/source/engine/parse.js +++ b/source/engine/parse.js @@ -162,7 +162,13 @@ export let parseObject = (rules, rule, parsedRules) => rawNode => { // eslint-disable-next-line jsx: () => ( - {formatValue({ unit: v.unit, value: v.nodeValue })} + {formatValue({ + unit: v.unit, + value: v.nodeValue, + // We want to display constants with full precision, + // espacilly for percentages like APEC 0,036 % + maximumFractionDigits: 5 + })} ) })