From 5e41118f2f7f80791b15e93f06826f75c206f0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Balayn?= Date: Wed, 6 Jun 2018 15:01:42 +0200 Subject: [PATCH] remove footnotes related stuff --- src/utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index 1c23b09..554708c 100644 --- a/src/utils.js +++ b/src/utils.js @@ -13,12 +13,14 @@ export function parseCaniuseData(feature, browsers) { browsers.forEach(function(browser) { support[browser] = {} for (var info in feature.stats[browser]) { - letters = feature.stats[browser][info].split(" ") + letters = feature.stats[browser][info].replace(/#\d+/, "").trim().split(" ") info = parseFloat(info.split("-")[0]) //if info is a range, take the left if (isNaN(info)) continue for (var i = 0; i < letters.length ; i++) { letter = letters[i] - if (letter === "y"){ // min support asked, need to find the min value + if (letter === "d") { // skip this letter, we don't support it yet + continue + } else if (letter === "y"){ // min support asked, need to find the min value if (typeof support[browser][letter] === "undefined" || info < support[browser][letter]) { support[browser][letter] = info