(editor: TextEditor, targets: TypedSelection[])
| 23 | } |
| 24 | |
| 25 | private getRanges(editor: TextEditor, targets: TypedSelection[]) { |
| 26 | const paragraphTargets = targets.filter( |
| 27 | (target) => target.selectionType === "paragraph" |
| 28 | ); |
| 29 | const ranges = targets.map((target) => |
| 30 | expandToContainingLine(editor, target.selection.selection) |
| 31 | ); |
| 32 | const unifiedRanges = unifyRanges(ranges); |
| 33 | return unifiedRanges.map((range) => ({ |
| 34 | range, |
| 35 | isParagraph: |
| 36 | paragraphTargets.find((target) => |
| 37 | target.selection.selection.isEqual(range) |
| 38 | ) != null, |
| 39 | })); |
| 40 | } |
| 41 | |
| 42 | private getEdits( |
| 43 | editor: TextEditor, |
no test coverage detected