Skip to content

Conversation

@jnkr-ifx
Copy link
Contributor

The matching filter searches for a partial regex match, and the empty regex matches anything.

Description

f015ea4 added the following check to skip generating a #[doc = "..."] attribute for items with no documentation:

{%- if doc_string is not matching("") %} 
#[doc = "{{doc_string}}"]
{%- endif -%}

However, the matching filter uses a regex match, and the empty regex matches everything. Therefore, all documentation was skipped. This PR replaces the regex with a string comparison against the empty string.

--- please keep the agreement as part of the PR text ---
By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/svd2pac/blob/main/CONTRIBUTING.md
CONTRIBUTING.md also tells you what to expect in the PR process.

The `matching` filter searches for a partial regex match, and the empty
regex matches anything.
@pellico pellico self-requested a review May 28, 2025 06:29
@pellico pellico merged commit d67af83 into Infineon:main May 28, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants