istio / api

API definitions for the Istio project
Apache License 2.0
455 stars 547 forks source link

Angle brackets are converted to HTML entities rather than passed through for shortcodes #3176

Open craigbox opened 4 months ago

craigbox commented 4 months ago

https://github.com/istio/api/blob/master/security/v1/peer_authentication.proto:

// {{< warning >}}
// Development of PeerAuthentication is currently frozen and likely to be replaced in Ambient.
// {{< /warning >}}

https://github.com/istio/api/blob/master/security/v1beta1/peer_authentication.pb.html:

<p>{{&lt; warning &gt;}}
Development of PeerAuthentication is currently frozen and likely to be replaced in Ambient.
{{&lt; /warning &gt;}}

The shortcodes don't work on the site as a result.

Screenshot 2024-05-02 at 2 25 02 PM

Can we change the parsing, or should we remove the shortcodes?

craigbox commented 4 months ago

(This is default behavior for protoc-gen-doc.)

howardjohn commented 4 months ago

I think we have our own at https://github.com/istio/tools/tree/master/cmd/protoc-gen-docs which ultimately plumbs out to https://github.com/yuin/goldmark

mikemorris commented 1 month ago

Not relevant to this specific example anymore as the warning is being removed in https://github.com/istio/istio.io/pull/15434, but did we try using the triple mustache {{{ }}} to disable auto-escaping?