Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Test that `{{name|x}}` and other near-variables stay plain text

Abierto Apto para principiantes
#13 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
92/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp
Área
testing

Línea de trabajo

Lee la teoría Tokens_that_are_not_variables_are_ignored en tests/Prompuff.Application.Tests/PromptTemplateServiceTests.cs y comprueba cómo sus casos verifican RenderSegments. Añade los ejemplos indicados que se parecen a variables y verifica que cada uno devuelva la plantilla completa como un único segmento Text. Ejecuta dotnet test tests/Prompuff.Application.Tests; estará hecho cuando los nuevos casos pasen sin cambios en src/.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

good first issue

ROADMAP.md decided that variable defaults and choice lists, if they come, go in a metadata key and not inside the braces, and that a body holding {{name|x}} renders as plain text in 1.0 and must keep doing so. No test pins that yet, so a change to the variable pattern could start treating these as variables without anything failing.

What to do

Add cases to the Tokens_that_are_not_variables_are_ignored theory for at least:

  • {{name|x}} and {{ name | x }}
  • {{name:default}}
  • a line break inside the braces, such as "{{\nname\n}}"
  • a name with a non-ASCII letter, such as {{café}}

For each case, also check that RenderSegments returns the whole template as one Text segment. Don't change PromptTemplateService: these already render as written, so the tests pass as soon as they're added.

Where to look

  • src/Prompuff.Application/Services/PromptTemplateService.cs: the VariableToken pattern (line 14).
  • tests/Prompuff.Application.Tests/PromptTemplateServiceTests.cs: the theory at line 58.
  • ROADMAP.md: "Decisions: market research (2026-10-10)", the bullet on variables gaining options without new syntax.

Done when

  • The new cases are in the theory and pass.
  • Each case also checks RenderSegments.
  • Nothing under src/ changes.

Testing it

dotnet test tests/Prompuff.Application.Tests
Lenguaje dominante
C#
Estrellas
0
Forks
1
Merge medio
1 h 21 min
PR fusionados (30 d)
22

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de hazeliscoding/prompuff

Todos los issues de hazeliscoding/prompuff

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.