Closed jim-hart closed 8 months ago
TSDoc DocStyle has many differences from Doxygen syntax the best is probably to redefine your own DocStyle. An example can by found here: https://github.com/20Tauri/DoxyDoxygen_contrib_HeaderDoc
Hey, thanks for getting back to me. I missed that feature entirely, that works!
I have only one remaining issue; using a TSDoc @example
tag.
For example, if I have the following:
/**
* Generate a range of numbers.
*
* @example
* ```ts
* // [0, 1, 2, 3, 4]
* range(5)
* ```
* @example
* ```ts
* // [0, 2, 4]
* range(0, 5, 2)
* ```
*
* @param start The first number of the range.
* @param stop The last number of the range.
* @param step A whole number to increment the range by.
*
* @returns A list of numbers from <start> to <stop> in increments of <step>.
*/
function range(start: number, stop: number, step = 1): number[] {}
Running a doxy command (like doxy_update_comments
) causes the following:
/**
* Generate a range of numbers.
*
* ```ts
* // [0, 1, 2, 3, 4]
* range(5)
* ``` @example ```ts // [0, 2, 4] range(0, 5, 2)
* ```
*
* @param start The first number of the range.
* @param stop The last number of the range.
* @param step A whole number to increment the range by.
*
* @returns A list of numbers from <start> to <stop> in increments of <step>.
*/
function range(start: number, stop: number, step = 1): number[] {}
Is there anything I can do on my end so the examples are left untouched?
Hello, sorry for the delay.
I cannot check your code, but you can try the following line
{ NAME: '@example', ARGS_FORMAT: '', ACTIONS: [ "raw_block_end", "raw_block_start" ], HELP: "Provide an example of how to use a documented item" },
I'd like to use TSdoc syntax and all it requires is changing a few of the tags in the Doxygen syntax (@return -> @returns) but I haven't been able to do this using settings.