From 90083433b3832b69baecb39725666e148ad6bfad Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Wed, 11 May 2016 11:44:24 +0800 Subject: [PATCH] site: fix links --- site/component/utils.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/site/component/utils.js b/site/component/utils.js index 4b9fbde9a4..ce6bc1c5f0 100644 --- a/site/component/utils.js +++ b/site/component/utils.js @@ -38,11 +38,11 @@ export function jsonmlToComponent(pathname, jsonml) { [(node) => getTagName(node) === 'video', (node, index) => , ], - [(node) => isElement(node) && getTagName(node) === 'a', (node, index) => { - if (getAttributes(node).class || - (getAttributes(node).href && getAttributes(node).href.indexOf('http') === 0)) { - return toReactComponent(node); - } + [(node) => isElement(node) && getTagName(node) === 'a' && !( + getAttributes(node).class || + (getAttributes(node).href && + getAttributes(node).href.indexOf('http') === 0) + ), (node, index) => { return {toReactComponent(getChildren(node)[0])}; }], [(node) => {