Skip to content

Commit f535f55

Browse files
Rename indexAfterRemovedSpaces to leadingSpacesCount
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 7d6a534 commit f535f55

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkgs/markdown/lib/src/block_syntaxes/fenced_code_block_syntax.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ class FencedCodeBlockSyntax extends BlockSyntax {
9494

9595
/// Removes the leading spaces (` `) from [content] up the given [upTo] count.
9696
static String _removeLeadingSpaces(String content, {required int upTo}) {
97-
var indexAfterRemovedSpaces = 0;
97+
var leadingSpacesCount = 0;
9898

9999
// Find the index of the first non-space character
100100
// or the first space after the maximum removed specified by 'upTo'.
101-
while (indexAfterRemovedSpaces < upTo &&
102-
indexAfterRemovedSpaces < content.length) {
101+
while (leadingSpacesCount < upTo &&
102+
leadingSpacesCount < content.length) {
103103
// We can just check for space (` `) since fenced code blocks
104104
// consider spaces before the opening code fence as the
105105
// indentation that should be removed.
106-
if (content.codeUnitAt(indexAfterRemovedSpaces) != $space) {
106+
if (content.codeUnitAt(leadingSpacesCount) != $space) {
107107
break;
108108
}
109-
indexAfterRemovedSpaces += 1;
109+
leadingSpacesCount += 1;
110110
}
111-
return content.substring(indexAfterRemovedSpaces);
111+
return content.substring(leadingSpacesCount);
112112
}
113113
}
114114

0 commit comments

Comments
 (0)