# BR-MSG-06

Quand une valeur est écrite avec une espace insécable ou fine, alors un motif écrit avec une espace normale la trouve quand même.

Défini dans [Protéger un message avant l'envoi au modèle](https://docs.piighost.dev/fr/domain/processes/protect-a-message/#br-msg-06).

## Où vit la règle

- [`normalize_spaces()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/text/normalization.py#L50)
- [`RegexDetector.detect()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/components/detector/regex.py#L76)

## Tests directs

- [`tests/components/detector/test_regex.py::TestDetect::test_empty_text_returns_empty`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/detector/test_regex.py#L43)
- [`tests/components/detector/test_regex.py::TestDetect::test_finds_a_single_match_with_exact_offsets`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/detector/test_regex.py#L19)
- [`tests/components/detector/test_regex.py::TestDetect::test_finds_every_match_of_a_pattern`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/detector/test_regex.py#L29)
- [`tests/components/detector/test_regex.py::TestDetect::test_finds_matches_for_every_label`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/detector/test_regex.py#L36)
- [`tests/components/detector/test_regex.py::TestDetect::test_no_match_returns_empty`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/detector/test_regex.py#L48)
- [`tests/components/detector/test_regex.py::TestUnicodeSpaces::test_a_line_separator_is_read_as_a_newline`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/detector/test_regex.py#L92)
- [`tests/components/detector/test_regex.py::TestUnicodeSpaces::test_a_pattern_written_for_a_space_matches_any_space`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/detector/test_regex.py#L67)
- [`tests/components/detector/test_regex.py::TestUnicodeSpaces::test_spaces_before_a_value_do_not_shift_its_offsets`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/detector/test_regex.py#L84)
- [`tests/components/detector/test_regex.py::TestUnicodeSpaces::test_the_detection_keeps_the_spaces_as_written`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/detector/test_regex.py#L77)
- [`tests/text/test_normalization.py::TestNormalizeSpaces::test_a_line_separator_becomes_a_newline`](https://github.com/Athroniaeth/piighost/blob/master/tests/text/test_normalization.py#L83)
- [`tests/text/test_normalization.py::TestNormalizeSpaces::test_a_space_separator_becomes_an_ascii_space`](https://github.com/Athroniaeth/piighost/blob/master/tests/text/test_normalization.py#L78)
- [`tests/text/test_normalization.py::TestNormalizeSpaces::test_other_characters_are_kept`](https://github.com/Athroniaeth/piighost/blob/master/tests/text/test_normalization.py#L88)
- [`tests/text/test_normalization.py::TestNormalizeSpaces::test_the_length_is_kept_so_offsets_hold`](https://github.com/Athroniaeth/piighost/blob/master/tests/text/test_normalization.py#L92)

## Tests indirects

- [`tests/components/detector/test_regex.py::TestConformance::test_satisfies_the_detector_port`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/detector/test_regex.py#L13)
- [`tests/pipeline/test_pipeline.py::TestUnicodeSpaces::test_a_regex_value_typed_with_no_break_spaces_is_hidden`](https://github.com/Athroniaeth/piighost/blob/master/tests/pipeline/test_pipeline.py#L239)

## Utilisé par

Aucun appelant trouvé.

Lu dans le graphe du code que construit graphify, aux emplacements que donne la documentation métier.
