DeclarationReference: Parser allows unquoted spaces
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 162
- Avg merge
- 17h 24m
- Merged PRs (30d)
- 8
Description
(Issue https://github.com/microsoft/tsdoc/issues/174 was mostly solved by PR https://github.com/microsoft/tsdoc/pull/177, so I'm creating a new issue to track this issue with spaces.)
Repro:
// (Actual) a.b c.d
// (Expected) SyntaxError
console.log(DeclarationReference.parse('a.b c.d').toString());
Since the DeclarationReference.parse() accepts escaped input, the parser should require the input to be quoted as a."b c".d. @rbuckton does that sound right?
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start at the DeclarationReference.parse() entry point and run the provided TypeScript reproduction to confirm that unquoted spaces are accepted. The issue is done when parsing a.b c.d raises SyntaxError while the quoted form a."b c".d remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100