[
  {
    "path": ".gitignore",
    "content": "node_modules\n"
  },
  {
    "path": "ISSUE_TEMPLATE.md",
    "content": "This repo is DEPRECATED, please create issues over at: https://github.com/cerebral/marksy\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Christian Alfoni\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
  },
  {
    "path": "README.md",
    "content": "# markdown-to-react-components\nConvert markdown into react components\n\n## DEPRECATED\nThis repo is DEPRECATED, please go to: https://github.com/cerebral/marksy\n"
  },
  {
    "path": "app/main.js",
    "content": "require('./prism.css');\nrequire('./prism.js');\nvar React = require('react');\nvar lib = require('markdown-to-react-components');\nvar DOM = React.DOM;\n\nvar HalfColumn = {\n  width: '50%',\n  verticalAlign: 'top',\n  display: 'inline-block'\n};\n\nlib.configure({\n  h1: React.createClass({\n    render: function () {\n      return DOM.h1({\n        style: {color: 'red'}\n      }, this.props.children)\n    }\n  })\n});\n\nvar App = React.createClass({\n  getInitialState: function () {\n    return {\n      tree: null\n    };\n  },\n  onTextareaChange: function (event) {\n    this.setState({\n      tree: lib(event.target.value).tree\n    });\n  },\n  render: function () {\n    return DOM.div(null,\n      DOM.div({\n        style: HalfColumn\n      }, this.state.tree),\n      DOM.textarea({\n        style: {\n          width: 500,\n          height: 500\n        },\n        onChange: this.onTextareaChange\n      })\n    );\n  }\n});\n\nReact.render(React.createElement(App), document.body);\n"
  },
  {
    "path": "app/prism.css",
    "content": "/* http://prismjs.com/download.html?themes=prism&languages=markup+clike+javascript+jsx */\n/**\n * prism.js default theme for JavaScript, CSS and HTML\n * Based on dabblet (http://dabblet.com)\n * @author Lea Verou\n */\n\ncode[class*=\"language-\"],\npre[class*=\"language-\"] {\n\tcolor: black;\n\tbackground: none;\n\ttext-shadow: 0 1px white;\n\tfont-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;\n\tdirection: ltr;\n\ttext-align: left;\n\twhite-space: pre;\n\tword-spacing: normal;\n\tword-break: normal;\n\tword-wrap: normal;\n\tline-height: 1.5;\n\n\t-moz-tab-size: 4;\n\t-o-tab-size: 4;\n\ttab-size: 4;\n\n\t-webkit-hyphens: none;\n\t-moz-hyphens: none;\n\t-ms-hyphens: none;\n\thyphens: none;\n}\n\npre[class*=\"language-\"]::-moz-selection, pre[class*=\"language-\"] ::-moz-selection,\ncode[class*=\"language-\"]::-moz-selection, code[class*=\"language-\"] ::-moz-selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\npre[class*=\"language-\"]::selection, pre[class*=\"language-\"] ::selection,\ncode[class*=\"language-\"]::selection, code[class*=\"language-\"] ::selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\n@media print {\n\tcode[class*=\"language-\"],\n\tpre[class*=\"language-\"] {\n\t\ttext-shadow: none;\n\t}\n}\n\n/* Code blocks */\npre[class*=\"language-\"] {\n\tpadding: 1em;\n\tmargin: .5em 0;\n\toverflow: auto;\n}\n\n:not(pre) > code[class*=\"language-\"],\npre[class*=\"language-\"] {\n\tbackground: #f5f2f0;\n}\n\n/* Inline code */\n:not(pre) > code[class*=\"language-\"] {\n\tpadding: .1em;\n\tborder-radius: .3em;\n\twhite-space: normal;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n\tcolor: slategray;\n}\n\n.token.punctuation {\n\tcolor: #999;\n}\n\n.namespace {\n\topacity: .7;\n}\n\n.token.property,\n.token.tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol,\n.token.deleted {\n\tcolor: #905;\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.inserted {\n\tcolor: #690;\n}\n\n.token.operator,\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string {\n\tcolor: #a67f59;\n\tbackground: hsla(0, 0%, 100%, .5);\n}\n\n.token.atrule,\n.token.attr-value,\n.token.keyword {\n\tcolor: #07a;\n}\n\n.token.function {\n\tcolor: #DD4A68;\n}\n\n.token.regex,\n.token.important,\n.token.variable {\n\tcolor: #e90;\n}\n\n.token.important,\n.token.bold {\n\tfont-weight: bold;\n}\n.token.italic {\n\tfont-style: italic;\n}\n\n.token.entity {\n\tcursor: help;\n}\n"
  },
  {
    "path": "app/prism.js",
    "content": "/* http://prismjs.com/download.html?themes=prism&languages=markup+clike+javascript+jsx */\nvar _self=\"undefined\"!=typeof window?window:\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\\blang(?:uage)?-(\\w+)\\b/i,t=_self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):\"Array\"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/\\u00a0/g,\" \")},type:function(e){return Object.prototype.toString.call(e).match(/\\[object (\\w+)\\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case\"Object\":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=t.util.clone(e[r]));return a;case\"Array\":return e.map&&e.map(function(e){return t.util.clone(e)})}return e}},languages:{extend:function(e,n){var a=t.util.clone(t.languages[e]);for(var r in n)a[r]=n[r];return a},insertBefore:function(e,n,a,r){r=r||t.languages;var l=r[e];if(2==arguments.length){a=arguments[1];for(var i in a)a.hasOwnProperty(i)&&(l[i]=a[i]);return l}var o={};for(var s in l)if(l.hasOwnProperty(s)){if(s==n)for(var i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);o[s]=l[s]}return t.languages.DFS(t.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=o)}),r[e]=o},DFS:function(e,n,a,r){r=r||{};for(var l in e)e.hasOwnProperty(l)&&(n.call(e,l,e[l],a||l),\"Object\"!==t.util.type(e[l])||r[e[l]]?\"Array\"!==t.util.type(e[l])||r[e[l]]||(r[e[l]]=!0,t.languages.DFS(e[l],n,l,r)):(r[e[l]]=!0,t.languages.DFS(e[l],n,null,r)))}},plugins:{},highlightAll:function(e,n){for(var a,r=document.querySelectorAll('code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code'),l=0;a=r[l++];)t.highlightElement(a,e===!0,n)},highlightElement:function(n,a,r){for(var l,i,o=n;o&&!e.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(e)||[,\"\"])[1],i=t.languages[l]),n.className=n.className.replace(e,\"\").replace(/\\s+/g,\" \")+\" language-\"+l,o=n.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,\"\").replace(/\\s+/g,\" \")+\" language-\"+l);var s=n.textContent,u={element:n,language:l,grammar:i,code:s};if(!s||!i)return t.hooks.run(\"complete\",u),void 0;if(t.hooks.run(\"before-highlight\",u),a&&_self.Worker){var c=new Worker(t.filename);c.onmessage=function(e){u.highlightedCode=e.data,t.hooks.run(\"before-insert\",u),u.element.innerHTML=u.highlightedCode,r&&r.call(u.element),t.hooks.run(\"after-highlight\",u),t.hooks.run(\"complete\",u)},c.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=t.highlight(u.code,u.grammar,u.language),t.hooks.run(\"before-insert\",u),u.element.innerHTML=u.highlightedCode,r&&r.call(n),t.hooks.run(\"after-highlight\",u),t.hooks.run(\"complete\",u)},highlight:function(e,a,r){var l=t.tokenize(e,a);return n.stringify(t.util.encode(l),r)},tokenize:function(e,n){var a=t.Token,r=[e],l=n.rest;if(l){for(var i in l)n[i]=l[i];delete n.rest}e:for(var i in n)if(n.hasOwnProperty(i)&&n[i]){var o=n[i];o=\"Array\"===t.util.type(o)?o:[o];for(var s=0;s<o.length;++s){var u=o[s],c=u.inside,g=!!u.lookbehind,f=0,h=u.alias;u=u.pattern||u;for(var p=0;p<r.length;p++){var d=r[p];if(r.length>e.length)break e;if(!(d instanceof a)){u.lastIndex=0;var m=u.exec(d);if(m){g&&(f=m[1].length);var y=m.index-1+f,m=m[0].slice(f),v=m.length,k=y+v,b=d.slice(0,y+1),w=d.slice(k+1),P=[p,1];b&&P.push(b);var A=new a(i,c?t.tokenize(m,c):m,h);P.push(A),w&&P.push(w),Array.prototype.splice.apply(r,P)}}}}}return r},hooks:{all:{},add:function(e,n){var a=t.hooks.all;a[e]=a[e]||[],a[e].push(n)},run:function(e,n){var a=t.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,a,r){if(\"string\"==typeof e)return e;if(\"Array\"===t.util.type(e))return e.map(function(t){return n.stringify(t,a,e)}).join(\"\");var l={type:e.type,content:n.stringify(e.content,a,r),tag:\"span\",classes:[\"token\",e.type],attributes:{},language:a,parent:r};if(\"comment\"==l.type&&(l.attributes.spellcheck=\"true\"),e.alias){var i=\"Array\"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}t.hooks.run(\"wrap\",l);var o=\"\";for(var s in l.attributes)o+=(o?\" \":\"\")+s+'=\"'+(l.attributes[s]||\"\")+'\"';return\"<\"+l.tag+' class=\"'+l.classes.join(\" \")+'\" '+o+\">\"+l.content+\"</\"+l.tag+\">\"},!_self.document)return _self.addEventListener?(_self.addEventListener(\"message\",function(e){var n=JSON.parse(e.data),a=n.language,r=n.code,l=n.immediateClose;_self.postMessage(t.highlight(r,t.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName(\"script\")).pop();return a&&(t.filename=a.src,document.addEventListener&&!a.hasAttribute(\"data-manual\")&&document.addEventListener(\"DOMContentLoaded\",t.highlightAll)),_self.Prism}();\"undefined\"!=typeof module&&module.exports&&(module.exports=Prism),\"undefined\"!=typeof global&&(global.Prism=Prism);\nPrism.languages.markup={comment:/<!--[\\w\\W]*?-->/,prolog:/<\\?[\\w\\W]+?\\?>/,doctype:/<!DOCTYPE[\\w\\W]+?>/,cdata:/<!\\[CDATA\\[[\\w\\W]*?]]>/i,tag:{pattern:/<\\/?(?!\\d)[^\\s>\\/=.$<]+(?:\\s+[^\\s>\\/=]+(?:=(?:(\"|')(?:\\\\\\1|\\\\?(?!\\1)[\\w\\W])*\\1|[^\\s'\">=]+))?)*\\s*\\/?>/i,inside:{tag:{pattern:/^<\\/?[^\\s>\\/]+/i,inside:{punctuation:/^<\\/?/,namespace:/^[^\\s>\\/:]+:/}},\"attr-value\":{pattern:/=(?:('|\")[\\w\\W]*?(\\1)|[^\\s>]+)/i,inside:{punctuation:/[=>\"']/}},punctuation:/\\/?>/,\"attr-name\":{pattern:/[^\\s>\\/]+/,inside:{namespace:/^[^\\s>\\/:]+:/}}}},entity:/&#?[\\da-z]{1,8};/i},Prism.hooks.add(\"wrap\",function(a){\"entity\"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,\"&\"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup;\nPrism.languages.clike={comment:[{pattern:/(^|[^\\\\])\\/\\*[\\w\\W]*?\\*\\//,lookbehind:!0},{pattern:/(^|[^\\\\:])\\/\\/.*/,lookbehind:!0}],string:/([\"'])(\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/,\"class-name\":{pattern:/((?:\\b(?:class|interface|extends|implements|trait|instanceof|new)\\s+)|(?:catch\\s+\\())[a-z0-9_\\.\\\\]+/i,lookbehind:!0,inside:{punctuation:/(\\.|\\\\)/}},keyword:/\\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\\b/,\"boolean\":/\\b(true|false)\\b/,\"function\":/[a-z0-9_]+(?=\\()/i,number:/\\b-?(?:0x[\\da-f]+|\\d*\\.?\\d+(?:e[+-]?\\d+)?)\\b/i,operator:/--?|\\+\\+?|!=?=?|<=?|>=?|==?=?|&&?|\\|\\|?|\\?|\\*|\\/|~|\\^|%/,punctuation:/[{}[\\];(),.:]/};\nPrism.languages.javascript=Prism.languages.extend(\"clike\",{keyword:/\\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\\b/,number:/\\b-?(0x[\\dA-Fa-f]+|0b[01]+|0o[0-7]+|\\d*\\.?\\d+([Ee][+-]?\\d+)?|NaN|Infinity)\\b/,\"function\":/[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*(?=\\()/i}),Prism.languages.insertBefore(\"javascript\",\"keyword\",{regex:{pattern:/(^|[^\\/])\\/(?!\\/)(\\[.+?]|\\\\.|[^\\/\\\\\\r\\n])+\\/[gimyu]{0,5}(?=\\s*($|[\\r\\n,.;})]))/,lookbehind:!0}}),Prism.languages.insertBefore(\"javascript\",\"class-name\",{\"template-string\":{pattern:/`(?:\\\\`|\\\\?[^`])*`/,inside:{interpolation:{pattern:/\\$\\{[^}]+\\}/,inside:{\"interpolation-punctuation\":{pattern:/^\\$\\{|\\}$/,alias:\"punctuation\"},rest:Prism.languages.javascript}},string:/[\\s\\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore(\"markup\",\"tag\",{script:{pattern:/(<script[\\w\\W]*?>)[\\w\\W]*?(?=<\\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:\"language-javascript\"}}),Prism.languages.js=Prism.languages.javascript;\n!function(a){var e=a.util.clone(a.languages.javascript);a.languages.jsx=a.languages.extend(\"markup\",e),a.languages.jsx.tag.pattern=/<\\/?[\\w\\.:-]+\\s*(?:\\s+[\\w\\.:-]+(?:=(?:(\"|')(\\\\?[\\w\\W])*?\\1|[^\\s'\">=]+|(\\{[\\w\\W]*?\\})))?\\s*)*\\/?>/i,a.languages.jsx.tag.inside[\"attr-value\"].pattern=/=[^\\{](?:('|\")[\\w\\W]*?(\\1)|[^\\s>]+)/i;var s=a.util.clone(a.languages.jsx);delete s.punctuation,s=a.languages.insertBefore(\"jsx\",\"operator\",{punctuation:/=(?={)|[{}[\\];(),.:]/},{jsx:s}),a.languages.insertBefore(\"inside\",\"attr-value\",{script:{pattern:/=(\\{(?:\\{[^}]*\\}|[^}])+\\})/i,inside:s,alias:\"language-javascript\"}},a.languages.jsx.tag)}(Prism);\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"markdown-to-react-components\",\n  \"version\": \"0.2.4\",\n  \"description\": \"Convert markdown into react components\",\n  \"main\": \"src/index.js\",\n  \"scripts\": {\n    \"start\": \"webpack-dev-server --devtool eval-source-map --progress --colors --content-base build\",\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/christianalfoni/markdown-to-react-components\"\n  },\n  \"keywords\": [\n    \"react\",\n    \"markdown\",\n    \"convert\"\n  ],\n  \"author\": \"Christian Alfoni\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/christianalfoni/markdown-to-react-components/issues\"\n  },\n  \"homepage\": \"https://github.com/christianalfoni/markdown-to-react-components\",\n  \"devDependencies\": {\n    \"css-loader\": \"^0.15.2\",\n    \"json-loader\": \"^0.5.2\",\n    \"node-libs-browser\": \"^0.5.2\",\n    \"react\": \"^0.14.7\",\n    \"style-loader\": \"^0.12.3\",\n    \"webpack\": \"^1.10.0\",\n    \"webpack-dev-server\": \"^1.10.1\"\n  },\n  \"dependencies\": {\n    \"he\": \"^1.1.0\",\n    \"marked\": \"^0.3.3\"\n  }\n}\n"
  },
  {
    "path": "src/CodeComponent.js",
    "content": "var React = require('react');\n\nvar CodeComponent = React.createClass({\n  componentDidMount: function () {\n    if (typeof Prism === 'undefined') {\n      console.warn('You do not have Prism included as a global object');\n      return;\n    }\n    Prism.highlightAll();\n  },\n  componentDidUpdate: function () {\n    if (typeof Prism === 'undefined') {\n      console.warn('You do not have Prism included as a global object');\n      return;\n    }\n    Prism.highlightAll();\n  },\n  render: function () {\n    return React.createElement('pre', {key: this.props.key},\n      React.createElement('code', {\n          ref: 'code',\n          className: 'language-' + this.props.language\n        }, this.props.code)\n    );\n  }\n});\n\nmodule.exports = CodeComponent;\n"
  },
  {
    "path": "src/index.js",
    "content": "var React = require('react');\nvar marked = require('marked');\nvar he = require('he');\nvar CodeComponent = React.createFactory(require('./CodeComponent.js'));\nvar renderer = new marked.Renderer();\nvar options = {};\nvar inlineIds = 0;\nvar keys = 0;\nvar inlines = {};\nvar result = [];\nvar toc = [];\n\n// Converts inline IDs to actual elements\nvar createBlockContent = function (content) {\n  var textWithInlines = content.split(/(\\{\\{.*?\\}\\})/);\n  content = textWithInlines.map(function (text) {\n    var inline = text.match(/\\{\\{(.*)\\}\\}/);\n    if (inline) {\n      return inlines[inline[1]];\n    } else {\n\t\t\tif (text != '') {\n      \treturn he.decode(text);\n\t\t\t}\n    }\n  });\n\n  return content;\n};\n\nvar getTocPosition = function (toc, level) {\n  var currentLevel = toc.children;\n  while (true) {\n    if (!currentLevel.length || currentLevel[currentLevel.length - 1].level === level) {\n      return currentLevel;\n    } else {\n      currentLevel = currentLevel[currentLevel.length - 1].children;\n    }\n  }\n};\n\nrenderer.code = function (code, language) {\n  var props = {\n    key: keys++,\n    language: language,\n    code: code\n  };\n\n  if (options.code) {\n    result.push(React.createElement(options.code, props));\n  } else {\n    result.push(CodeComponent(props));\n  }\n};\n\nrenderer.blockquote = function (text) {\n  var count = text.split(/(\\{\\{.*?\\}\\})/).filter(function(n){ return n != \"\"});\n\n  count.forEach(function(){\n    result.pop();\n  });\n\n  result.push(React.createElement(options.blockquote || 'blockquote', {key: keys++}, createBlockContent(text)));\n};\n\nrenderer.html = function (html) {\n    result.push(React.createElement(options.html || React.createClass({\n        render: function render () {\n            return React.createElement('div', {\n                dangerouslySetInnerHTML: {\n                    __html: this.props.html\n                }\n            });\n        }\n    }), {\n        html: html\n    }));\n};\n\nrenderer.heading = function (text, level) {\n  var type = 'h' + level;\n  type = options[type] || type;\n  var id = text.replace(/\\s/g, '-').toLowerCase();\n  var lastToc = toc[toc.length -1];\n  if (!lastToc || lastToc.level > level) {\n    toc.push({\n      id: id,\n      title: text,\n      level: level,\n      children: []\n    });\n  } else {\n    var tocPosition = getTocPosition(lastToc, level);\n    tocPosition.push({\n      id: id,\n      title: text,\n      level: level,\n      children: []\n    });\n  }\n  var inId = inlineIds++;\n  inlines[inId] = React.createElement(type, {\n    key: keys++,\n    id: id\n  },\n    createBlockContent(text));\n  result.push(inlines[inId]);\n  return '{{' + inId + '}}';\n};\n\nrenderer.hr = function () {\n  result.push(React.createElement(options.hr || 'hr', {key: keys++}));\n};\n\nrenderer.list = function (body, ordered) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(ordered ? options.ol || 'ol' : options.ul || 'ul', {key: keys++}, createBlockContent(body));\n  result.push(inlines[id]);\n  return '{{' + id + '}}';\n\n};\n\nrenderer.listitem = function (text) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.li || 'li', {key: keys++}, createBlockContent(text));\n  return '{{' + id + '}}';\n};\n\nrenderer.paragraph = function (text) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.p || 'p', {key: keys++}, createBlockContent(text));\n  result.push(inlines[id]);\n  return '{{' + id + '}}';\n};\n\nrenderer.table = function (header, body) {\n  var id = inlineIds++;\n  inlines[id] =  React.createElement(options.table || 'table', {key: keys++},\n    React.createElement(options.thead || 'thead', null, createBlockContent(header)),\n    React.createElement(options.tbody || 'tbody', null, createBlockContent(body))\n  );\n  result.push(inlines[id]);\n  return '{{' + id + '}}';\n};\n\nrenderer.thead = function (content) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.thead || 'thead', {key: keys++}, createBlockContent(content));\n  return '{{' + id + '}}';\n};\n\nrenderer.tbody = function (content) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.tbody || 'tbody', {key: keys++}, createBlockContent(content));\n  return '{{' + id + '}}';\n};\n\nrenderer.tablerow = function (content) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.tr || 'tr', {key: keys++}, createBlockContent(content));\n  return '{{' + id + '}}';\n};\n\nrenderer.tablecell = function (content, flags) {\n  var id = inlineIds++;\n  var props =  flags.align ? {className: 'text-' + flags.align} : {key: keys++};\n  inlines[id] = React.createElement(flags.header ? options.th || 'th' : options.td || 'td', props, createBlockContent(content));\n  return '{{' + id + '}}';\n};\n\nrenderer.link = function (href, title, text) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.a || 'a', {\n    href: href,\n    title: title,\n    key: keys++,\n    target: 'new'\n  }, createBlockContent(text));\n  return '{{' + id + '}}';\n};\n\nrenderer.strong = function (text) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.strong || 'strong', {key: keys++}, createBlockContent(text));\n  return '{{' + id + '}}';\n};\n\nrenderer.em = function (text) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.em || 'em', {key: keys++}, createBlockContent(text));\n  return '{{' + id + '}}';\n};\n\nrenderer.codespan = function (text) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.codespan || 'code', {key: keys++}, he.decode(text));\n  return '{{' + id + '}}';\n};\n\nrenderer.br = function () {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.br || 'br', {key: keys++});\n  return '{{' + id + '}}';\n};\n\nrenderer.del = function (text) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.del || 'del', {key: keys++}, he.decode(text));\n  return '{{' + id + '}}';\n};\n\nrenderer.image = function (href, title, text) {\n  var id = inlineIds++;\n  inlines[id] = React.createElement(options.img || 'img', {src: href, alt: title, key: keys++});\n  return '{{' + id + '}}';\n};\n\nvar exec = function (content) {\n  result = [];\n  toc = [];\n  inlines = {};\n  keys = 0;\n  marked(content, {renderer: renderer, smartypants: true});\n  return {\n    tree: result,\n    toc: toc\n  };\n};\n\nexec.configure = function (newOptions) {\n  options = newOptions;\n};\n\nmodule.exports = exec;\n"
  },
  {
    "path": "webpack.config.js",
    "content": "var path = require('path');\n\nvar sourcePath = path.resolve(__dirname, 'src', 'index.js');\nvar appPath = path.resolve(__dirname, 'app', 'main.js');\n\nmodule.exports = {\n  entry: [\n    'webpack-dev-server/client?http://localhost:8080',\n    appPath\n  ],\n  output: {\n    path: './build',\n    filename: 'bundle.js'\n  },\n  resolve: {\n    alias: {\n      'markdown-to-react-components': sourcePath\n    }\n  },\n  module: {\n    loaders: [{\n      test: /\\.json$/,\n      loader: 'json'\n    }, {\n      test: /\\.css$/,\n      loader: 'style!css'\n    }]\n  }\n};\n"
  }
]