tsdoc
tsdoc copied to clipboard
DeclarationReference: Parser allows unquoted spaces
(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?
Hmm... In the current implementation, DeclarationReference.parse('a.b c.d').toString() outputs "a.b c.d".