This is an automated email from the ASF dual-hosted git repository.

djencks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 0c815fd  update templates to use exposed sanitizeId function
0c815fd is described below

commit 0c815fdb6d3203c12f9684689dcc366ef5926cb7
Author: David Jencks <djen...@apache.org>
AuthorDate: Sun Jan 30 19:26:39 2022 -0800

    update templates to use exposed sanitizeId function
---
 script/gen_crd/gen_crd_api.sh       | 5 +++--
 script/gen_crd/template/members.tpl | 2 +-
 script/gen_crd/template/pkg.tpl     | 2 +-
 script/gen_crd/template/type.tpl    | 4 ++--
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/script/gen_crd/gen_crd_api.sh b/script/gen_crd/gen_crd_api.sh
index f4d696f..696d21e 100755
--- a/script/gen_crd/gen_crd_api.sh
+++ b/script/gen_crd/gen_crd_api.sh
@@ -24,13 +24,14 @@ echo "Generating CRD API documentation..."
 # to run a local copy use something like
 #go run /Users/david/projects/camel/gen-crd-api-reference-docs/main.go \
 #you will probably need to comment out use of blackfriday.
-go run 
github.com/djencks/gen-crd-api-reference-docs@7400a10b36d7cfa7563ea48ce0df15a9d4c2de87
 \
+go run 
github.com/djencks/gen-crd-api-reference-docs@e63530f10b55be5f2d82e223d83f86c13e5158e5
 \
     -config $location/gen-crd-api-config.json \
     -template-dir $location/template \
     -api-dir "github.com/apache/camel-k/pkg/apis/camel/v1" \
     -out-file $crd_file_camel
 
-go run 
github.com/djencks/gen-crd-api-reference-docs@7400a10b36d7cfa7563ea48ce0df15a9d4c2de87
 \
+#go run /Users/david/projects/camel/gen-crd-api-reference-docs/main.go \
+go run 
github.com/djencks/gen-crd-api-reference-docs@e63530f10b55be5f2d82e223d83f86c13e5158e5
 \
     -config $location/gen-kamelets-crd-api-config.json \
     -template-dir $location/template \
     -api-dir "github.com/apache/camel-k/pkg/apis/camel/v1alpha1" \
diff --git a/script/gen_crd/template/members.tpl 
b/script/gen_crd/template/members.tpl
index 5771f11..23afa37 100644
--- a/script/gen_crd/template/members.tpl
+++ b/script/gen_crd/template/members.tpl
@@ -5,7 +5,7 @@
 |`{{ fieldName . }}` +
 {{ if linkForType .Type -}}
   {{- if isLocalType .Type -}}
-*xref:{{ linkForType .Type}}[{{ asciiDocAttributeEscape (typeDisplayName 
.Type) }}]*
+*xref:#{{ sanitizeId (anchorIDForType .Type) }}[{{ asciiDocAttributeEscape 
(typeDisplayName .Type) }}]*
   {{- else -}}
 *{{ linkForType .Type}}[{{ asciiDocAttributeEscape (typeDisplayName .Type) }}]*
   {{- end -}}
diff --git a/script/gen_crd/template/pkg.tpl b/script/gen_crd/template/pkg.tpl
index c0cb3b4..e539cdc 100644
--- a/script/gen_crd/template/pkg.tpl
+++ b/script/gen_crd/template/pkg.tpl
@@ -1,7 +1,7 @@
 {{ define "packages" -}}
 {{ range .packages -}}
 
-[#{{ packageAnchorID . }}]
+[#{{ sanitizeId (packageAnchorID .) }}]
 == {{ packageDisplayName . }}
 
     {{- with (index .GoPackages 0 ) -}}
diff --git a/script/gen_crd/template/type.tpl b/script/gen_crd/template/type.tpl
index d6f0dcf..d52c4c3 100644
--- a/script/gen_crd/template/type.tpl
+++ b/script/gen_crd/template/type.tpl
@@ -1,12 +1,12 @@
 {{ define "type" }}
 
-[#{{ anchorIDForType . }}]
+[#{{ sanitizeId (anchorIDForType .) }}]
 === {{ .Name.Name }}{{ if eq .Kind "Alias" }}(`{{.Underlying}}` alias){{ end }}
 {{- with (typeReferences .) }}
 
 *Appears on:*
 {{ range . }}
-* <<{{ linkForType . }}, {{ typeDisplayName . }}>>
+* <<#{{ sanitizeId (anchorIDForType .) }}, {{ typeDisplayName . }}>>
 {{- end -}}
 {{- end }}
 

Reply via email to