Test that `{{name|x}}` and other near-variables stay plain text
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
阅读 tests/Prompuff.Application.Tests/PromptTemplateServiceTests.cs 中的理论 Tokens_that_are_not_variables_are_ignored,并检查其中的用例如何断言 RenderSegments。添加列出的近似变量示例,并验证每个示例都将整个模板作为一个 Text 段返回。运行 dotnet test tests/Prompuff.Application.Tests;新用例通过且 src/ 下没有变更时即完成。
由索引模型根据 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: theVariableTokenpattern (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
- 主要语言
- C#
- 星标
- 0
- 派生
- 1
- 平均合并
- 1 小时 51 分钟
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hazeliscoding/prompuff 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 78/100
hazeliscoding/prompuff#34 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
hazeliscoding/prompuff#22 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 90/100
hazeliscoding/prompuff#14 ·
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
hazeliscoding/prompuff#12 ·
维护者通常 1 天内回复
-
Translations未关闭enhancement later
难度 5/5 一周以上 新手友好度 25/100
hazeliscoding/prompuff#62 ·
维护者通常 1 天内回复
查看 hazeliscoding/prompuff 的全部 Issue
相似的 Issue
-
[BUG]: Position intent set on a simple order is dropped when it becomes a bracket, OCO or OTO order可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
alpacahq/alpaca-trade-api-csharp#903 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
joinrpg/joinrpg-net#5752 ·
维护者通常 1 天内回复
-
bug ux
难度 2/5 1-3 小时 新手友好度 78/100
CodeForFire/lagebuch#714 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
dimitar-radenkov/Pointframe#294 ·
维护者通常 1 天内回复
-
kind/feature-request
难度 2/5 1-3 小时 新手友好度 68/100
Altinn/altinn-correspondence#2154 ·
维护者通常 1 天内回复