protoc-gen-doc icon indicating copy to clipboard operation
protoc-gen-doc copied to clipboard

Replace "\n" with "<br>" inside markdown tables

Open ayjayt opened this issue 6 years ago • 15 comments

https://github.com/pseudomuto/protoc-gen-doc/issues/366

Newlines destroy table formatting unless they are html line breaks. This fix makes a conversion using the swig "replace" function.

@pseudomuto because I don't know who else to tag.

ayjayt avatar Apr 02 '19 03:04 ayjayt

Hey @ayjayt, can you run make examples so we can see the output diff here

pseudomuto avatar Apr 15 '19 17:04 pseudomuto

@pseudomuto, i'll try to get to it by the end of the week

ayjayt avatar Apr 16 '19 12:04 ayjayt

@ayjayt any update on this?

Globegitter avatar Jul 16 '19 08:07 Globegitter

Woops, I'll take a looksy now

ayjayt avatar Jul 17 '19 15:07 ayjayt

Okay, I updated my branch to be even with master, I cloned both into my $GOPATH, ran make && make examples in both, and:

~/go/src/github.com/ayjayt/protoc-gen-doc$ diff examples/ ../../pseudomuto/protoc-gen-doc/examples/ -qr
~/go/src/github.com/ayjayt/protoc-gen-doc$

ayjayt avatar Jul 17 '19 16:07 ayjayt

Pinging @pseudomuto for awareness

ayjayt avatar Jul 17 '19 16:07 ayjayt

I can't reproduce the CI errors /shrug

ayjayt avatar Jul 17 '19 16:07 ayjayt

Could someone look into that? The PR is helpful but failing CI is blocking this. The CI error occurred for me as well with go 1.13 on some other projects. The dependencies need to be reviewed to get rid of this or checksum verification can be disabled in CI.

lukasmalkmus avatar Sep 07 '19 13:09 lukasmalkmus

FWIW there were no updates to upstream/master to retry building against and I was able to run make build/lint/bench successfully on my local so I'm still lost on these errors.

ayjayt avatar Sep 13 '19 15:09 ayjayt

Exactly the same here. Works fine locally. For travis to work, you could set GOPROXY=direct and GOSUMDB=off. Maybe something to be discussed with the maintainers.

lukasmalkmus avatar Sep 13 '19 20:09 lukasmalkmus

:tada: :tada: :tada:

After a whole year.... now that I'm working on an RPC project again...

I merged upstream updates into the fix and it builds now!

Again: This fixes instances where multi-line comments don't translate to md docs because '\n' doesn't work inside Markdown's ||| table syntax.

@pseudomuto

---edit lol, removed all the markdown the example.md output diff is still empty, since the repo's examples don't contain an instance of the bug

ayjayt avatar May 14 '20 14:05 ayjayt

Any movement on this? Is it waiting on conflicts to be resolved or is something else needed to be done?

Happy to have a go at resolving conflicts if that's what needs to be done.

alexhayes avatar Jan 18 '21 23:01 alexhayes

It was fine the last time I checked, but that was a while ago

On Mon, Jan 18, 2021, 5:01 PM Alex Hayes [email protected] wrote:

Any movement on this? Is it waiting on conflicts to be resolved or is something else needed to be done?

Happy to have a go at resolving conflicts if that's what needs to be done.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pseudomuto/protoc-gen-doc/pull/386#issuecomment-762505548, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHHLRFPXGT4ZAM2FUCJBRV3S2S4V3ANCNFSM4HC4FVBA .

ayjayt avatar Jan 18 '21 23:01 ayjayt

Hopefully this problem will be fixed. Blank lines in sections in comments are causing the markdown tables to collapse.

maku77 avatar Dec 23 '22 06:12 maku77