{{- $rand_id := now.UnixNano -}}
{{- if not (.Get "label") -}}
{{- errorf "\n\nNo \"label\" element for {{< hover >}} tag on %s\n\n\n" .Position -}}
{{- end -}}
{{- if not (.Get "line") -}}
{{- errorf "\n\nNo \"line\" number element for {{< hover >}} tag on %s \n\n\n" .Position -}}
{{- end -}}
<code><highlight-term id="{{$rand_id}}" data-label={{.Get "label" }} data-line={{.Get "line" }}>{{ .Inner }}</highlight-term></code>
{{/*
How to Use

Create a normal code fence with triple ticks.
```shell


add a goldmark attribute to set a label for JS to key on.
```shell {label="zzxxzz"}

Put the code nomally.
```shell {label="zzxxzz"}
cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-aws
spec:
  package: xpkg.upbound.io/upbound/provider-aws:v0.15.0
  packagePullSecrets:
    - name: package-pull-secret
EOF
```

Now, for the keyword you want to be a hoverover use the shortcode. Do not put the command in backticks.
This would be text around {{< hover label="zzxxzz" line="4">}}kind: Provider{{< /hover >}} the command.

Provide the label of the code block and the line number to highlight.
*/}}