pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.61k stars 462 forks source link

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

Open skywalker2909 opened 4 years ago

skywalker2909 commented 4 years ago

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.

RedHawker commented 4 years ago

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