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

Markdown - HTML anchor tags are not generated for Scalar Value Types

Open skywalker2909 opened this issue 5 years ago • 1 comments

I am able to generate the markdown doc file from my proto but the ## Scalar Value Types section in the end does not have an HTML anchor tag.

skywalker2909 avatar Mar 16 '20 16:03 skywalker2909

Grab the template file from here and store it locally: https://github.com/pseudomuto/protoc-gen-doc/blob/master/resources/markdown.tmpl

In the Scalar Value Types section at the bottom, add:

<a name="{{.ProtoType}}" /> after the first pipe, |

Then to use the modified template, change your --doc_opt to:

--doc_opt=/path/to/markdown.tmpl,outputfile.md

RedHawker avatar Aug 21 '20 21:08 RedHawker