Skip to content
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

fix: support multi line description in markdown #486

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bjet007
Copy link

@bjet007 bjet007 commented Apr 6, 2022

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:
#445
#386

thanks for @kelvie-pstg and @ayjayt for their previous attemps.

@bwebster
Copy link

I'm using your changes in our custom markdown template, and it's working great.

@alexhayes
Copy link

Can confirm this also works for me - thanks!

@0rphon
Copy link

0rphon commented Nov 1, 2022

i would love for this to get merged!

@S1artie
Copy link

S1artie commented Feb 9, 2023

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.

@lucasoares
Copy link

Just saw this hahaha I also did a fork and fixed it: #520

I did a few things different but it's almost the same thing. I also want this merged.

@SpicyLemon
Copy link

I just added a comment to #366: #366 (comment) 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants