Line ending handling broken on Win32 platform
还没有人认领这个 Issue。
评估
调研方向
检查 Template.init 中的文件名路径,并将其与文本参数的路径进行比较,重点关注所提到的 rb 与 rU 文件打开模式。在 Windows 上使用 CR-LF 模板重现该问题,并验证输出是否保留每个行尾,且不会额外添加回车符。
由索引模型根据 Issue 内容生成。
描述
Migrated issue, originally created by Anonymous
Version 0.3.4
Line ending handling of templates is broken on Windows:
For each "CR-LF" sequence in the template file you get "CR-CR-LF" in the output.
This only happens when using the filename argument to Template.init(), not if the text argument is used to supply the template.
I think this is due to opening file with mode "rb" where mode "rU" should be used to automatically convert line endings to the correct internal format on all platforms.
- 主要语言
- Python
- 星标
- 459
- 派生
- 96
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sqlalchemy/mako 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 38/100
sqlalchemy/mako#432 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
sqlalchemy/mako#417 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 30/100
sqlalchemy/mako#392 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 15/100
sqlalchemy/mako#382 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 48/100
sqlalchemy/mako#376 · 9 条评论 ·
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
UKGovernmentBEIS/inspect_ai#5781 ·
维护者通常 2 天内回复
-
Bump .cicd to wamp-cicd 4c2f9ac: `just land` refuses open A18 decisions, `just where` lists them未关闭
难度 1/5 1 小时以内 新手友好度 82/100
crossbario/cfxdb#139 ·
-
Bump .cicd to wamp-cicd 4c2f9ac: `just land` refuses open A18 decisions, `just where` lists them未关闭
难度 1/5 1 小时以内 新手友好度 84/100
crossbario/txaio#241 ·
-
UX
难度 2/5 1-3 小时 新手友好度 82/100
mediajunkie/piper-morgan-product#1963 ·
-
难度 2/5 1-3 小时 新手友好度 64/100