mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 00:36:29 -05:00
Addedn rangeContainsRange helper function
This commit is contained in:
@@ -665,7 +665,8 @@ namespace ts.formatting {
|
||||
|
||||
// if child is a list item - try to get its indentation, only if parent is within the original range.
|
||||
let childIndentationAmount = Constants.Unknown;
|
||||
if (isListItem && parent.pos >= originalRange.pos && parent.end <= originalRange.end) {
|
||||
|
||||
if (isListItem && rangeContainsRange(originalRange, parent)) {
|
||||
childIndentationAmount = tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation);
|
||||
if (childIndentationAmount !== Constants.Unknown) {
|
||||
inheritedIndentation = childIndentationAmount;
|
||||
|
||||
Reference in New Issue
Block a user