mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 19:40:56 +08:00
feat(ngdocs): support for HTML table generation from docs code
This commit is contained in:
committed by
Igor Minar
parent
b0233a33a1
commit
cf38d8c55b
@@ -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];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user