Protect all blockquotes with norust
#92
Labels
generator
Issues related to the code generator
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
We need to parse the CommonMark comments and protect all block quotes with
norust
.Background
The Protobuf and OpenAPI v3 documentation comments are in Markdown format, they are supposed to be (aip.dev/192) in CommonMark format, though sometimes they deviate from the AIP.
The generator converts these Protobuf comments into Rustdoc comments.
Rust tries to compile all blockquotes unless protected by a
norust
mark.Block quotes appear in many different forms in the CommonMark spec.
In #57 I fixed block quotes protected by backticks (
```
), then I thought of other ways to specify block quotes.Overview
We need to parse the CommonMark comments, apply changes in the syntax tree, and re-emit Markdown. Probably in the Codec's
FormatDocComments()
function. As a starting point, consider this Golang library: https://github.com/yuin/goldmarkAlternatives Considered
We could try to perform this cleanup using heuristics. Shudder. 😨
The text was updated successfully, but these errors were encountered: