Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
xlorne committed Sep 30, 2018
1 parent 2f09912 commit 70868fa
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/main/resources/templates/markdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@

<script th:inline="javascript" type="text/javascript">

String.prototype.replaceAll = function (FindText, RepText) {
var regExp = new RegExp(FindText, "g");
return this.replace(regExp, RepText);
}



var getDefaultVal = function (type) {
if (type == 'integer') {
Expand Down Expand Up @@ -460,7 +466,22 @@
type = api.attr("method");
}
console.log(path,type);
api.append(getApiTable(path,type,docApi));
var html = api[0].outerHTML;

html = html.replaceAll("<","&#60;");
html = html.replaceAll(">","&#62;");
try{
var nowPath = docApi.paths[path];
var consumes = nowPath[type];
if(consumes==undefined){
api.append(html);
}else{
api.append(getApiTable(path,type,docApi));
}
}catch (e) {
api.append(html);
}

});
});
}
Expand Down

0 comments on commit 70868fa

Please sign in to comment.