Add support for start attribute on ordered lists#116
Merged
LittleLittleCloud merged 3 commits intomainfrom Nov 15, 2025
Merged
Conversation
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the HTML start attribute on ordered lists (<ol>) to allow custom starting numbers, addressing issue #115.
- Implemented
startattribute parsing inHtmlListElementTranslatorwith fallback to default value of 1 for invalid inputs - Added comprehensive unit tests covering both valid and invalid
startattribute values - Enhanced the Gallery showcase to demonstrate ordered lists starting at a custom number (50)
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/RazorConsole.Core/Vdom/Translators/HtmlListElementTranslator.cs | Added logic to read and apply the start attribute for ordered lists, with safe parsing and default fallback |
| src/RazorConsole.Tests/Vdom/VdomSpectreTranslatorTests.cs | Added two test cases: one verifying custom start numbers work correctly, and one ensuring invalid values default gracefully to 1 |
| src/RazorConsole.Gallery/Components/HtmlListGallery.razor | Added demonstration of ordered list with start="50" attribute in both Preview and example code sections |
LittleLittleCloud
approved these changes
Nov 15, 2025
Copilot
AI
changed the title
[WIP] Add support for start attribute in ordered list
Add support for Nov 15, 2025
start attribute on ordered lists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements HTML5
startattribute for<ol>elements to allow custom starting numbers.Changes
startattribute, use for list numbering (defaults to 1)start="50"Usage
Renders as
50. Coffee,51. Tea,52. Milk.Original prompt
startattribute #115✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.