GoogleCloudPlatform / proto-gen-md-diagrams

A utility for generating Markdown documentation for Protocol Buffers that include Mermaid UML Diagrams.
Apache License 2.0
55 stars 16 forks source link

fix for annotation parsing #19

Open jan-dolejsi opened 4 months ago

jan-dolejsi commented 4 months ago

Annotation parser did not handle [deprecated = true] due to some upstram preprocessing that strips the white space around =.

Also, the assumption that splitting leads to exactly 3 token is not robust. Due to some other bug in the upstream parser, the google.protobuf.timestamp ends up parsing the doc comment and the annotation parser chokes on the [toISOString()](http://...) link that looks to it like an annotation. I did not find why is it happening, but I protected the Annotation parser by checking the number of tokens after the splitting.

google-cla[bot] commented 4 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.