Closed iansk closed 11 months ago
In AsciiDoc, all sections, by default, have an anchor or ID. You can manually override the like this:
[#some-crazy-anchor] == My Heading Some para text.
The Franklin adoc-to-HTML converter strips out underscores for anchors that start with an underscore (e.g. #_hello is transformed to #hello).
#_hello
#hello
However, if there's an underscore in the middle of the string, the converters leaves it alone. (e.g. #good_bye is left as #good_bye.
#good_bye
We've got a lot of pre-existing content where anchors start with an underscore, so if Franklin does support the syntax, we'd like to fix this.
Tests:
Adoc source to test anchors and internal cross reference links to those anchors: https://github.com/hlxsites/prisma-cloud-docs/blob/edda943b9f1bd214b597c3546900c146db6ad4a0/docs/en/enterprise-edition/content-collections/governance/custom-build-policies/custom-build-policy-examples.adoc?plain=1#L8-L35
Site preview of this page in action: https://main--prisma-cloud-docs-website--hlxsites.hlx.page/prisma/prisma-cloud/en/enterprise-edition/content-collections/governance/custom-build-policies/custom-build-policy-examples?branch=ian-test-anchors#good_bye
We'll live with it.
Closing
In AsciiDoc, all sections, by default, have an anchor or ID. You can manually override the like this:
The Franklin adoc-to-HTML converter strips out underscores for anchors that start with an underscore (e.g.
#_hello
is transformed to#hello
).However, if there's an underscore in the middle of the string, the converters leaves it alone. (e.g.
#good_bye
is left as#good_bye
.We've got a lot of pre-existing content where anchors start with an underscore, so if Franklin does support the syntax, we'd like to fix this.
Tests:
Adoc source to test anchors and internal cross reference links to those anchors: https://github.com/hlxsites/prisma-cloud-docs/blob/edda943b9f1bd214b597c3546900c146db6ad4a0/docs/en/enterprise-edition/content-collections/governance/custom-build-policies/custom-build-policy-examples.adoc?plain=1#L8-L35
Site preview of this page in action: https://main--prisma-cloud-docs-website--hlxsites.hlx.page/prisma/prisma-cloud/en/enterprise-edition/content-collections/governance/custom-build-policies/custom-build-policy-examples?branch=ian-test-anchors#good_bye