mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
LibWeb: Fix off-by-one for alphabetical markers in <ol>s
The ListItemMarker gets its index 1-based while the String::bijective_base_from expects its index to be 0-based. This patch adjusts the index passed around accordingly.
This commit is contained in:
parent
ed0e7b53a5
commit
d1ed6bce5d
1 changed files with 2 additions and 2 deletions
|
@ -30,11 +30,11 @@ ListItemMarkerBox::ListItemMarkerBox(DOM::Document& document, CSS::ListStyleType
|
|||
break;
|
||||
case CSS::ListStyleType::LowerAlpha:
|
||||
case CSS::ListStyleType::LowerLatin:
|
||||
m_text = String::bijective_base_from(m_index).to_lowercase();
|
||||
m_text = String::bijective_base_from(m_index - 1).to_lowercase();
|
||||
break;
|
||||
case CSS::ListStyleType::UpperAlpha:
|
||||
case CSS::ListStyleType::UpperLatin:
|
||||
m_text = String::bijective_base_from(m_index);
|
||||
m_text = String::bijective_base_from(m_index - 1);
|
||||
break;
|
||||
case CSS::ListStyleType::None:
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue