github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/docs/templates/utils.tmpl (about) 1 <!-- linkify_param is used to wrap constructor/function params in an anchor tag. --> 2 {{ define "linkify_param" }}<span class="nx">{{ if ne .Link "" }}<a href="{{ .Link }}">{{ end }}{{ if ne .DisplayName "" }}{{ .DisplayName }}{{ else }}{{ .Name }}{{ end }}{{ if ne .Link "" }}</a>{{ end }}</span>{{ end }} 3 4 <!-- linkify_go_param is used to wrap constructor/function params in an anchor tag specifically for go constructors. We are treating this as a snowflake for now. --> 5 {{ define "linkify_go_param" }}<span class="nx">{{ if ne .Link "" }}<a href="{{ .Link }}">{{ end }}New{{ if ne .DisplayName "" }}{{ .DisplayName }}{{ else }}{{ .Name }}{{ end }}{{ if ne .Link "" }}</a>{{ end }}</span>{{ end }} 6 7 <!-- linkify wraps any propertyType instance in an anchor tag. The display name/name is rendered as-is by passing it through the htmlSafe function 8 to avoid double-encoding html characters, which is typical of properties type names. --> 9 {{ define "linkify" }}<a href="{{ .Link }}">{{ if ne .DisplayName "" }}{{ htmlSafe .DisplayName }}{{ else }}{{ htmlSafe .Name }}{{ end }}</a>{{ end }} 10 11 <!-- linkify_constructor_args is like linkify, but will display the DescriptionName if it's present --> 12 {{ define "linkify_constructor_args" }}<a href="{{ .Link }}">{{ if ne .DescriptionName "" }}{{ htmlSafe .DescriptionName }}{{ else if ne .DisplayName "" }}{{ htmlSafe .DisplayName }}{{ else }}{{ htmlSafe .Name }}{{ end }}</a>{{ end }} 13 14 <!-- linkify_wo_style an wraps a propertyType with an anchor tag but retains parent styling. The display name/name is rendered as-is by 15 passing it through the htmlSafe function 16 to avoid double-encoding html characters, which is typical of properties type names. --> 17 {{ define "linkify_wo_style" }} 18 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="{{ .Link }}" style="color: inherit; text-decoration: inherit;">{{ if ne .DisplayName "" }}{{ htmlSafe .DisplayName }}{{ else }}{{ htmlSafe .Name }}{{ end }}</a> 19 {{ end }}