Trim doc block annotations after parsing

Summary:
Trims doc block annotations. This mitigates problems with leading and trailing spaces in `providesModule` annotations.

This module doesn’t have tests, but it is exclusively used for `providesModule` annotations right now.

Reviewed By: mjesun

Differential Revision: D5319814

fbshipit-source-id: de55df5b4b199738f9b01151eb86f3c863485b15
This commit is contained in:
David Aurelio 2017-06-26 06:03:32 -07:00 committed by Facebook Github Bot
parent e74e123300
commit 3cf8242128
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ function parse(docblock: string): Array<[string, string]> {
var result = []; var result = [];
var match; var match;
while ((match = propertyRe.exec(docblock))) { while ((match = propertyRe.exec(docblock))) {
result.push([match[1], match[2]]); result.push([match[1], match[2].trim()]);
} }
return result; return result;