frontmatter: an unterminated quoted scalar is accepted silently and keeps its opening quote
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, node.js
调研方向
先阅读 site/lib/frontmatter.mjs 和 lib.test.mjs;检查 parseScalar 如何处理带引号的值,以及 frontmatter 错误如何报告行号。添加拒绝未闭合引号标量和列表项的用例,然后运行 npm run validate,并确认 fixture 报告未闭合引号所在的行。
由索引模型根据 Issue 内容生成。
描述
Why it matters
name: "Foo (a missing closing quote, an easy slip when a name contains an apostrophe) parses as the string "Foo and flows into pages, data.json, the CSV and the feed with a stray quote. checkTitleMatchesName happens to catch it for name, but publisher, attribution_string, grid_dimensions, ue_versions and list items have no backstop.
Evidence (at 69387df)
site/lib/frontmatter.mjs:69-82 parseScalar only unquotes when the value both starts and ends with the same quote; otherwise it returns the raw text. Verified: parsing a frontmatter block containing name: "Foo yields meta.name === '"Foo' with errors empty.
Suggested approach
In parseScalar (or in parseFrontmatter where line numbers are known), when a trimmed value starts with " or ' and does not end with the matching quote, push line N: "key" opens a quote that is never closed. Same for list items.
Done when
lib.test.mjs has a rejecting case; npm run validate fails on a fixture with an unterminated quote and names the line.
- 主要语言
- JavaScript
- 星标
- 58
- 派生
- 15
- 平均合并
- 16 小时 53 分钟
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/Free-Game-Dev-Assets 的其他 Issue
-
community marketing priority: low
难度 2/5 1-3 小时 新手友好度 72/100
TMHSDigital/Free-Game-Dev-Assets#151 ·
维护者通常 1 天内回复
-
community marketing priority: medium
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/Free-Game-Dev-Assets#150 ·
维护者通常 1 天内回复
-
community enhancement priority: medium
难度 2/5 1-3 小时 新手友好度 82/100
TMHSDigital/Free-Game-Dev-Assets#149 ·
维护者通常 1 天内回复
-
community documentation priority: medium
难度 1/5 1-3 小时 新手友好度 88/100
TMHSDigital/Free-Game-Dev-Assets#148 ·
维护者通常 1 天内回复
-
site: the Unreal guide is missing from the homepage Guides list, and the hero calls tools "assets"未关闭bug marketing priority: medium
难度 1/5 1-3 小时 新手友好度 85/100
TMHSDigital/Free-Game-Dev-Assets#147 ·
维护者通常 1 天内回复
查看 TMHSDigital/Free-Game-Dev-Assets 的全部 Issue
相似的 Issue
-
bug Frontend P2-medium UI UX
难度 1/5 1 小时以内 新手友好度 76/100
Deepak3699/Ai_Mentor#427 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
11ty/buildawesome#4407 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
keyxmakerx/Chronicle#1711 ·
维护者通常 1 天内回复
-
frontend
难度 2/5 1-3 小时 新手友好度 69/100
uoftblueprint/canada-basketball#79 ·
维护者通常 1 天内回复
-
New App Request
难度 1/5 1 小时以内 新手友好度 76/100
ThatGuySam/doesitarm#1126 · 1 条评论 ·