From ce81ae134ce35e9810386ad8a9a4a9fbc145569a Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Fri, 13 Apr 2018 03:11:41 -0300 Subject: [PATCH] remove unused code --- website/playground/Playground.js | 33 -------------------------------- 1 file changed, 33 deletions(-) diff --git a/website/playground/Playground.js b/website/playground/Playground.js index e08dabdf..a339098d 100644 --- a/website/playground/Playground.js +++ b/website/playground/Playground.js @@ -180,39 +180,6 @@ class Playground extends React.Component { } } -function createVersionLink(version) { - const link = document.createElement("a"); - const match = version.match(/^\d+\.\d+\.\d+-pr.(\d+)$/); - if (match) { - link.href = "https://github.com/prettier/prettier/pull/" + match[1]; - link.textContent = `PR #${match[1]}`; - } else { - if (version.match(/\.0$/)) { - link.href = - "https://github.com/prettier/prettier/releases/tag/" + version; - } else { - link.href = - "https://github.com/prettier/prettier/blob/master/CHANGELOG.md#" + - version.replace(/\./g, ""); - } - link.textContent = `v${version}`; - } - return link; -} - -function categorizeOptions(availableOptions, render) { - const optionsByCategory = availableOptions.reduce((acc, option) => { - let options; - acc[option.category] = options = acc[option.category] || []; - options.push(option); - return acc; - }, {}); - - return CATEGORIES_ORDER.filter(c => optionsByCategory[c]).map(category => - render(category, optionsByCategory[category]) - ); -} - function getDefaultOptions(availableOptions) { return availableOptions.reduce((acc, option) => { acc[option.name] = option.default;