Open bjet007 opened 2 years ago
I'm using your changes in our custom markdown template, and it's working great.
Can confirm this also works for me - thanks!
i would love for this to get merged!
We are now also using this fix as it is in a custom protoc-gen-doc fork, and it works fine! ping @pseudomuto as requested in the contribution guidelines - maybe this can be merged, it seems to be wanted by a lot of people.
Just saw this hahaha I also did a fork and fixed it: https://github.com/pseudomuto/protoc-gen-doc/pull/520
I did a few things different but it's almost the same thing. I also want this merged.
I just added a comment to #366: https://github.com/pseudomuto/protoc-gen-doc/issues/366#issuecomment-2394509233 about this. TL;DR: Changing {{nobr .Description}}
entries to {{nobr .Description | p}}
(5 places) also fixes this. An alternative fix might be to update the nobr
filter to join the paragraphs with <br>
instead of /n/n
.
When working with proto containing multi line comment, the markdown format is not generated properly as line break will corrupt the markdown table.
As we are creating proto that contains comment for the gRCP Gateway documentation, most of our field description have multi line with Example. It would be a nice addition to support that keyword in the template to, but for now we only want a valid markdown.
This merge request is trying to complete previous merge request that were never completed: https://github.com/pseudomuto/protoc-gen-doc/pull/445 https://github.com/pseudomuto/protoc-gen-doc/pull/386
thanks for @kelvie-pstg and @ayjayt for their previous attemps.