This change enables GitHub flavored markdown for APIdoc comments. The code example in map.js shows how to use markdown for code snippets. doc/index.md is now included again as start page for the docs. Everything in the doc/tutorials directory will also be added to the docs as tutorial. As an example, I moved the ol3.md file with the architecture to the tutorials directory. Currently properties and methods annotated with @inheritDoc or @override won't be documented at all. This is a known issue, so I added a custom JSDoc plugin with a hack to avoid this.
16 lines
436 B
JavaScript
16 lines
436 B
JavaScript
/*
|
|
* This is a hack to prevent inheritDoc and override tags from entirely removing
|
|
* documentation of the method that inherits the documentation.
|
|
*
|
|
* TODO: Remove this hack when https://github.com/jsdoc3/jsdoc/issues/53
|
|
* is addressed.
|
|
*/
|
|
exports.handlers = {
|
|
|
|
beforeParse: function(e) {
|
|
e.source = e.source.replace(
|
|
/\/\*\*\r?\n?\s*\* @(inheritDoc|override)\r?\n?\s*\*\/\r?\n?/g,
|
|
"/***\n *\n */\n");
|
|
}
|
|
|
|
}; |