This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-website.git
The following commit(s) were added to refs/heads/main by this push:
new 44c72334 Fix link check: render option and header names as literal
text in boldLink (#1908)
44c72334 is described below
commit 44c72334ca52d6d929bb4fb47c0c79b2f6d525cf
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Dec 2 11:41:41 2026 +0100
Fix link check: render option and header names as literal text in boldLink
(#1908)
The amqp component now declares the header prefix "JMS_AMQP_MA_". Its
trailing "_" closed an emphasis opened by the "_" of the anchor id
"[[_endpoint_header_JMSAMQPMA]]", so the anchor was rendered as text and
the link checker reported the fragment #_endpoint_header_JMSAMQPMA of
components/next/amqp-component.html as missing.
Wrap the name in a "+...+" passthrough so it is shown as is. The anchor id
is unchanged. Checked against all 7448 distinct option and header names of
the Camel catalog: before, the amqp header was the only broken one; after,
every name renders with its anchor and the name in bold.
Signed-off-by: Claus Ibsen <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
util/jsonpath-util.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/util/jsonpath-util.js b/util/jsonpath-util.js
index 40cc789f..28e7932c 100644
--- a/util/jsonpath-util.js
+++ b/util/jsonpath-util.js
@@ -42,7 +42,10 @@ module.exports = {
// A trailing dot (header prefixes such as "CamelBox.") would end the id
in "_", and
// "_..._" inside the xref target is then rendered as emphasis, breaking
the fragment.
const idText =
`_${idPrefix}_${text.split(/[*_`#~^]*/g).join('').split('.').join('_')}`.replace(/_+$/,
'')
- text = suffix ? `*${text}* (${suffix})` : `*${text}*`
+ // Show the name as literal text: a name with a trailing "_" (header
prefixes such as
+ // "JMS_AMQP_MA_") would otherwise close an emphasis opened by the "_" of
the anchor id,
+ // and the [[id]] anchor is then rendered as text instead of an <a id>.
+ text = suffix ? `*+${text}+* (${suffix})` : `*+${text}+*`
return `[[${idText}]]\nxref:#${idText}['',role=anchor]${text}`
},