Example of converting markdown via Pandoc with extendet support of highlight code in html.
For pretty print I am using SyntaxHighlither and some post script. Result:
/**
* @param {int} a
* @param {int} b
* @return {int}
**/
function sub(a, b) {
return a - b;
}
/**
* @class A
*/
function A() {
}
/**
* Some method of class A
*/
A.prototype.method1 = function() {
}