denoland / deno_doc

Documentation generator for Deno
MIT License
263 stars 59 forks source link

jsdoc rendering summary can end with a `:` #633

Open crowlKats opened 2 months ago

crowlKats commented 2 months ago

In some cases, a JSDoc summary can end with a :. We should change this by backtracking to a . if one is present and only show the content until then, else still show the summary as-is.

The relevant part of the codebase is https://github.com/denoland/deno_doc/blob/93f4ce335aba6e03cf52be4d5ed804068eee4937/src/html/jsdoc.rs#L392-L418

c43721 commented 2 weeks ago

I'd be interested in working on this but could you help provide an example of what the output is currently and what it should look like? Thanks!

crowlKats commented 5 days ago

@c43721 sure. for example: https://docs.deno.com/api/node/child_process/~/exec

The summary currently renders like this:

Screenshot 2024-11-21 at 16 15 25

However since it ends with :, it should backtrack, so it should end up being this

Screenshot 2024-11-21 at 16 15 50