sphinx-needs icon indicating copy to clipboard operation
sphinx-needs copied to clipboard

FIX: Use `re.fullmatch` for `needs_id_regex` in need creation

Open chrisjsewell opened this issue 7 months ago • 2 comments

The regex supplied should be assumed to match the entire string, rather than be a partial match (as is the case currently using re.match).

This is then consistent with the usage of needs_id_regex in:

  • https://github.com/useblocks/sphinx-needs/blob/1de1a7a047bfc7912ea0aa779ffb187def7a5254/sphinx_needs/directives/needextend.py#L111
    • https://github.com/useblocks/sphinx-needs/blob/1de1a7a047bfc7912ea0aa779ffb187def7a5254/sphinx_needs/directives/needextract.py#L103

chrisjsewell avatar Jul 01 '24 13:07 chrisjsewell