test(spec): add grammar fixture for multiline double-quoted strings with JSON escapes

Open Beginner friendly
#1,532 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
testing

Research direction

Start from the existing fixture spec/fixtures/1.0/grammar/005-lex-escapes and the grammar suite README to learn the input.oui and expected.json format. Add a new fixture folder (the issue suggests 011-lex-multiline-escapes) with a two-line double-quoted string containing \", \\, \u0041 and optionally a raw tab, plus its expected decoded output and an empty errors list. Done when the fixture files exist, the README row cites language.md §1.3 and §1.4, and the expected output matches the spec.

Written by the indexing model from the issue text.

Description

Kind

Test / conformance

Related

#1445 (raw newline/tab in double-quoted strings breaks JSON escape decoding).

Problem

spec/fixtures/1.0/grammar/005-lex-escapes only covers escapes on a single line. There is no grammar conformance fixture for:

  • a double-quoted string that contains a raw newline (or tab) and JSON escapes such as \", \\, \uXXXX
  • the expected decoded text after a correct lexer pass

So a regression of the #1445 failure mode (falling back to undecoded raw text when JSON.parse rejects control characters) would not be caught by the published 1.0 grammar suite.

Proposal

Add something like spec/fixtures/1.0/grammar/011-lex-multiline-escapes (numbering per the suite's gaps) with:

  • input.oui: a Text / Title string spanning two lines with \" / \u0041 (and optionally a raw tab case)
  • expected.json: decoded quotes / A, empty errors
  • a one-line README row pointing at language.md §1.3 and §1.4

Implementation fix stays on #1445; this issue is only the conformance harness so other clients stay aligned.

Happy to send a fixtures-only PR after maintainer approval.

Dominant language
TypeScript
Stars
10k
Forks
698
Avg merge
1d 2h
Merged PRs (30d)
138

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from thesysdev/openui

All issues in thesysdev/openui

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.