Browse Source

site: convert a to Link

pull/1596/head
Benjy Cui 9 years ago
parent
commit
b81034cc13
  1. 3
      site/component/utils.js

3
site/component/utils.js

@ -38,6 +38,9 @@ export function jsonmlToComponent(pathname, jsonml) {
[(node) => getTagName(node) === 'video', (node, index) =>
<VideoPlayer video={getAttributes(node)} key={index} />
],
[(node) => getTagName(node) === 'a', (node, index) =>
<Link to={getAttributes(node).href} key={index}>{toReactComponent(getChildren(node)[0])}</Link>
],
[(node) => {
return isElement(node) &&
getTagName(node) === 'p' &&

Loading…
Cancel
Save