Skip to content

Commit 918e6fe

Browse files
committed
current block cannot be at the same level as a preivous block
1 parent ff1cea4 commit 918e6fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/client/typeFormatters/codeBlockFormatProvider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ export class CodeBlockFormatProvider {
4040
const startPosition = new Position(position.line, 0);
4141
const endPosition = new Position(position.line, line.firstNonWhitespaceCharacterIndex - startOfBlockInLine);
4242

43-
if (startPosition === endPosition) {
44-
return [];
43+
if (startPosition.isEqual(endPosition)) {
44+
// current block cannot be at the same level as a preivous block
45+
continue;
4546
}
4647
if (options.insertSpaces) {
4748
return [

0 commit comments

Comments
 (0)