markvincze / sabledocs

Simple static documentation generator for Protobuf and gRPC contracts.
MIT License
54 stars 12 forks source link

Incorrect link to type in rpc description #4

Closed vharitonsky closed 1 year ago

vharitonsky commented 1 year ago

Link to message type lacks leading . in rpc description, so anchor does not work: image

Link in rpc is https://proto.git-doc.example.com/src/.html#message-StopWordsResponse

Correct link in Messages list is

https://proto.git-doc.example.com/src/.html#message-.StopWordsResponse

markvincze commented 1 year ago

Thanks for the report, I'll take a look at this. In the demo page (https://markvincze.github.io/sabledocs/demo/google.datastore.v1.html#service-google.datastore.v1.Datastore) it works correctly, so I think this issue might be specific to the case where there is no package name. I think in that case the id of the heading should not even start with a .. In any case, I'll try to reproduce and fix.

markvincze commented 1 year ago

Can you share some details about your module setup? In the files defining these types like StopWordsResponse, you don't have a package specifier at all? That was the only way I could reproduce this, but with that there are other problems too, as that "package" does not get rendered at all on the main page in the packages list. I'll try to fix both issues.

markvincze commented 1 year ago

@vharitonsky I did an attempt at a fix, it's released as a prerelease version, you can install it with

pip install sabledocs==0.3.166.dev0

Could you give it a try if this version works correctly?

vharitonsky commented 1 year ago

Works perfectly, thanks!