Skip to content

Change NestingCounter into NestingStack.#1363

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test_893169638
Apr 2, 2026
Merged

Change NestingCounter into NestingStack.#1363
copybara-service[bot] merged 1 commit intomasterfrom
test_893169638

Conversation

@copybara-service
Copy link
Copy Markdown

Change NestingCounter into NestingStack.

Although most uses will effectively be an expensive counter, with a stack where every element is Integer.valueOf(1), the introduction of Markdown support will mean some uses where that is not the case. For example, the continuing indentation of list items will depend on whether they are HTML lists or Markdown lists, and for Markdown lists it will further depend on the list type.

For now, implement the indentation of <ul> (etc) and <li> using the stack rather than multiplications.

Although most uses will effectively be an expensive counter, with a stack where every element is `Integer.valueOf(1)`, the introduction of Markdown support will mean some uses where that is not the case. For example, the continuing indentation of list items will depend on whether they are HTML lists or Markdown lists, and for Markdown lists it will further depend on the list type.

For now, implement the indentation of `<ul>` (etc) and `<li>` using the stack rather than multiplications.

PiperOrigin-RevId: 893521393
@copybara-service copybara-service bot merged commit 142c392 into master Apr 2, 2026
@copybara-service copybara-service bot deleted the test_893169638 branch April 2, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant