typegen: add shorthand for type/property links
This commit is contained in:
parent
11ff70f1a8
commit
db5c3aa3f4
3 changed files with 115 additions and 24 deletions
|
@ -13,5 +13,16 @@
|
|||
{{- $of = printf "<%s>" (partial "qmltype.html" .of) }}
|
||||
{{- end -}}
|
||||
|
||||
<a href="{{ $link }}">{{ .name }}</a>{{ $of | safeHTML -}}
|
||||
{{- $member := "" -}}
|
||||
|
||||
{{- if .prop -}}
|
||||
{{- $member = printf ".%s" .prop -}}
|
||||
{{- if eq .type "qt" -}}
|
||||
{{- $link = printf "%s#%s-prop" $link .prop -}}
|
||||
{{- else if eq .type "local" -}}
|
||||
{{- $link = printf "%s#prop.%s" $link .prop -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
<a href="{{ $link }}">{{ .name }}{{ $member }}</a>{{ $of | safeHTML -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue