Do you know if there is some sort of <code />
tag in JSDoc? I need to add pieces of code in my documentation like this:
/** * This function does something see example below: * * var x = foo("test"); //it will show "test" message * * @param {string} str: string argument that will be shown in message */ function foo(str) { alert(str); }
I need the code in the comments to be displayed by JSDoc as code (if not syntax highlighted, at least like pre-formatted or something with grey background).
JSDoc comments should generally be placed immediately before the code being documented. Each comment must start with a /** sequence in order to be recognized by the JSDoc parser. Comments beginning with /* , /*** , or more than 3 stars will be ignored.
@example
http://code.google.com/p/jsdoc-toolkit/wiki/TagExample
/** * This function does something see example below: * @example * var x = foo("test"); //it will show "test" message * * @param {string} str: string argument that will be shown in message */ function foo(str) { alert(str); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With