-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsii-docgen seems to use javadoc syntax instead of tsdoc #1634
Comments
Can you please post the relevant section from your jsii assembly. If it's already wrong in the assembly, the issue is with aws/jsii-compiler and not jsii-docgen. (And because these repos live in a different organizations we unfortunately cannot move the issue.) |
Sure thing! I've created this repository illustrating both this issue, and the other one I reported at the same time. The relevant part for this issue is the parsing of this line:
Which results in this line in the assembly, which is from this segment:
(note that the |
Oh, I forgot to include the repro for the link issue - in the generated json documentation for typescript, this line is in javadoc syntax -
Which seems odd, as it was originally from a properly formed tsdoc comment here.
I'm not sure if there are other issues like this, these are just the two I noticed. |
Also, let me know if you want me to reopen these issues somewhere else. |
That's a great reproduction. Both look like issues with aws/jsii-compiler. But no promises on priority. I'm pretty sure jsii doesn't parse these things itself but relies on other tools. So we might need to look into them. |
Thanks! Opened aws/jsii-compiler#1498 to track this. |
tsdoc and javadoc have slightly different syntax.
For example, tsdoc wants a hyphen at the start of
@param
descriptions, while javadoc does not:I've got automated tooling to enforce tsdoc syntax, but because jsii-docgen assumes the javadoc syntax, then the documentation ends up with errant
-
characters at the start of each parameter.Another difference is in links. For example, tsdoc links use
|
to separate the text from the target, but javadoc does not.However, the generated
remarks
sections when using-l typescript -f json
re-print the links in javadoc syntax, even if the format istypescript
.The text was updated successfully, but these errors were encountered: