frontmatter: an unterminated quoted scalar is accepted silently and keeps its opening quote
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
Research direction
Read site/lib/frontmatter.mjs and lib.test.mjs first; inspect how parseScalar handles quoted values and how frontmatter errors are reported with line numbers. Add rejecting cases for unterminated quoted scalars and list items, then run npm run validate and confirm the fixture reports the line of the unclosed quote.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- JavaScript
- Stars
- 58
- Forks
- 15
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TMHSDigital/Free-Game-Dev-Assets
-
documentation priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TMHSDigital/Free-Game-Dev-Assets#178 ·
Maintainers usually reply within 1 day
-
enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TMHSDigital/Free-Game-Dev-Assets#176 ·
Maintainers usually reply within 1 day
-
copy: headline and README badge count 418 including 2 deprecated entries; the catalog shows 416Openbug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
TMHSDigital/Free-Game-Dev-Assets#175 ·
Maintainers usually reply within 1 day
-
enhancement priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
TMHSDigital/Free-Game-Dev-Assets#174 ·
Maintainers usually reply within 1 day
-
bug hardening priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
TMHSDigital/Free-Game-Dev-Assets#170 ·
Maintainers usually reply within 1 day
All issues in TMHSDigital/Free-Game-Dev-Assets
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bigcalendar/react-big-calendar#2823 ·
-
feature t-tooling
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
neutral:fix
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
documentation enhancement
Difficulty 1/5 Under an hour Newbie friendliness 85/100
OWASP/cve-lite-cli#1480 ·
Maintainers usually reply within 2 days