Skip to content

Commit 22cc869

Browse files
committed
fix doc test
1 parent 44a3900 commit 22cc869

File tree

2 files changed

+1016
-64
lines changed

2 files changed

+1016
-64
lines changed

opentelemetry-semantic-conventions/scripts/templates/registry/rust/attribute.rs.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
{% for root_ns in ctx %}
1313
{% for attr in root_ns.attributes | rejectattr("name", "in", params.excluded_attributes) %}
14-
{{ [attr.brief, concat_if("\n\n## Notes\n\n", attr.note), attr_macros.examples(attr)] | comment }}
14+
{# Escape any `<...>` tags to `[...]` to avoid Rustdoc warnings and HTML parsing issues. #}
15+
{% set safe_note = attr.note | replace('<', '[') | replace('>', ']') %}
16+
{{ [attr.brief, concat_if("\n\n## Notes\n\n", safe_note), attr_macros.examples(attr)] | comment }}
1517
{% if attr is experimental %}
1618
#[cfg(feature = "semconv_experimental")]
1719
{% endif %}

0 commit comments

Comments
 (0)