diff --git a/docs/generate-metadata.js b/docs/generate-metadata.js index 0df383aee8..b8b2318813 100644 --- a/docs/generate-metadata.js +++ b/docs/generate-metadata.js @@ -2,6 +2,11 @@ import metadata from 'react-component-metadata'; import glob from 'glob'; import fsp from 'fs-promise'; import promisify from '../tools/promisify'; +import marked from 'marked'; + +marked.setOptions({ + xhtml: true +}); let globp = promisify(glob); @@ -23,6 +28,7 @@ let isLiteral = str => str.trim()[0] === '"' || str.trim()[0] === "'"; function parseDoclets(obj){ obj.doclets = metadata.parseDoclets(obj.desc || ''); obj.desc = cleanDoclets(obj.desc || ''); + obj.descHtml = marked(obj.desc || ''); } /** diff --git a/docs/src/PropTable.js b/docs/src/PropTable.js index 11dc39c26e..686afbf180 100644 --- a/docs/src/PropTable.js +++ b/docs/src/PropTable.js @@ -70,7 +70,7 @@ const PropTable = React.createClass({
{this.getType(prop)}
{prop.defaultValue} - {prop.desc} + ); }); diff --git a/package.json b/package.json index db70cb579b..bf7b11898e 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "less": "^2.4.0", "less-loader": "^2.1.0", "lodash": "^3.5.0", + "marked": "^0.3.3", "mocha": "^2.2.1", "mt-changelog": "^0.5.2", "node-libs-browser": "^0.5.2",