Repository navigation
fix(mascara): no tapar abreviaturas con & ni frases entre llaves - #40
Conversation
«R&D», «Q&A» o «B&B» ya no se toman por códigos de color, y una frase entre llaves se traduce; los códigos reales (&6Wrench&r, &c&l, {image:…}, {@Pagebreak}, {0}) se siguen protegiendo. Con las respuestas grabadas, ningún pedido de los tres bancos cambió.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d19e5c5d28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| #: Códigos de color y estilo. «&D» no lo es en una abreviatura en mayúsculas («R&D», «Q&A», «B&B»); pegado a una | ||
| #: palabra en minúscula sí («&6Wrench&r»). | ||
| _COLOR: Final = r"§[0-9a-fk-orA-FK-OR]|(?<![A-Z])&[0-9a-fk-orA-FK-OR]|(?<=[A-Z])&(?:[0-9a-fk-or]|[A-FK-OR](?=[a-z]))" |
There was a problem hiding this comment.
Preserve uppercase codes after all-caps words
When an uppercase ampersand code follows an all-caps word, such as WRENCH&R or WRENCH&R Ready, the uppercase-predecessor branches do not match because the code is not followed immediately by a lowercase letter. The code is therefore sent as translatable text and can be lost or changed; sin_formato also leaves it in place. The previous matcher protected this form, so preserve uppercase codes here without masking terminal R&D as a code.
Useful? React with 👍 / 👎.
Primer detalle de la ola 8 del plan de calidad: la máscara tapa solo los códigos.
Qué cambia
«&» en abreviaturas (
nucleo/mascara.py,_COLOR)sin_formato.Llaves
{0},{clave},{key.jump};@:{@pagebreak};{image:… width:50}.Medición
Con las respuestas grabadas, sin costo:
Una primera versión de la regla dejaba sin proteger el «&r» pegado a una palabra. La grabación de misiones la detectó: cambiaban todos los pedidos. Las pruebas cubren ese caso.
Verificación
scripts/verificar.pycompleto: 1388 pruebas pasan. Las pruebas nuevas están entests/test_mascara_precisa.py.