mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Allowed comment directives to be multiline (#38228)
* Allowed comment directives to be multiline * Added tests, and perhaps fixed a test runner bug? * I think it's going to need a consistent variable to loop over * Used dynamically computed indexes in verifies * Added multiline tests * Increased flexibility for multiline comment parsing * Undid a couple of formatting changes; removed backslashes from multiline regexp * Added baseline tests for multiline comment skipping Co-authored-by: Orta Therox <orta.therox@gmail.com>
This commit is contained in:
co-authored by
Orta Therox
parent
4b08c0582d
commit
be2eb8a2e1
+40
-14
File diff suppressed because one or more lines are too long
@@ -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,
|
||||
]))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user