Cherry-pick PR #38228 into release-3.9 (#38350)

Component commits:
956ac2132a Allowed comment directives to be multiline

12749c9291 Added tests, and perhaps fixed a test runner bug?

99bb366fd6 I think it's going to need a consistent variable to loop over

a21477d6ac Used dynamically computed indexes in verifies

992441d9b8 Added multiline tests

199d256ba2 Increased flexibility for multiline comment parsing

65a7587432 Undid a couple of formatting changes; removed backslashes from multiline regexp

036a4ae922 Merge branch 'master'

b620104be2 Merge branch 'master' of https://github.com/microsoft/TypeScript into multiline-comment-directives

Co-authored-by: Orta Therox <orta.therox@gmail.com>
This commit is contained in:
TypeScript Bot
2020-05-06 13:11:45 -07:00
committed by GitHub
co-authored by Orta Therox
parent 90570dfe09
commit e261cdd2f6
13 changed files with 767 additions and 208 deletions
+40 -14
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -474,7 +474,7 @@ namespace ts {
export function createCommentDirectivesMap(sourceFile: SourceFile, commentDirectives: CommentDirective[]): CommentDirectivesMap {
const directivesByLine = createMapFromEntries(
commentDirectives.map(commentDirective => ([
`${getLineAndCharacterOfPosition(sourceFile, commentDirective.range.pos).line}`,
`${getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line}`,
commentDirective,
]))
);