-
-
Notifications
You must be signed in to change notification settings - Fork 739
Description
As it stands, TypeDoc splits comments based on the first empty line within the docstring:
/**
* Here's some documentation.
*
* Here's more detail.
*/
On our output, we get some useful splitting.
shortText
: "Here's some documentation."text
: "Here's more detail."
Unfortunately, this can cause serious headaches when it's not wanted. Take this example:
/**
* Here's some documentation with inline code:
* ```js
* var a = 0;
*
* console.log(a);
* ```
*/
Now we end up with something much worse.
shortText
: "Here's some documentation with inline code:\n```js\nvar a = 0;"text
: "console.log(a);\n```"
Of course, the parser would have to be way smarter to handle cases like this where the code markdown spans multiple lines, and I don't know how feasible that is. Maybe there could be an option where the text
field would always contain the full comment text. That would make custom theming much simpler for those of us who want to handle things differently. Right now, it's hard to concatenate the comments since the lines end up trimmed.
I'm open for helping with this if someone can point me to an example where the JSON output is built differently based on some command-line option.