feat(ngdocs): support for HTML table generation from docs code

This commit is contained in:
Matias Niemelä
2013-04-29 15:20:10 -04:00
committed by Igor Minar
parent b0233a33a1
commit cf38d8c55b
5 changed files with 12 additions and 1306 deletions

View File

@@ -2,7 +2,7 @@
* All parsing/transformation code goes here. All code here should be sync to ease testing.
*/
var Showdown = require('../../lib/showdown').Showdown;
var Showdown = require('showdown');
var DOM = require('./dom.js').DOM;
var htmlEscape = require('./dom.js').htmlEscape;
var Example = require('./example.js').Example;
@@ -174,7 +174,7 @@ Doc.prototype = {
});
});
text = parts.join('');
text = new Showdown.converter().makeHtml(text);
text = new Showdown.converter({ extensions : ['table'] }).makeHtml(text);
text = text.replace(/(?:<p>)?(REPLACEME\d+)(?:<\/p>)?/g, function(_, id) {
return placeholderMap[id];
});