1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00

Fix a math error in the repeating counter type.

Does not currently matter as wa do not allow new counter styles,
and all pre-defined repeating style have only one symbol.
This commit is contained in:
Simon Sapin 2011-12-19 10:06:58 +01:00
parent 41c6547644
commit b1b49bdb95

View File

@ -81,7 +81,7 @@ def register_formatter(function):
@register_formatter
def repeating(symbols, _negative, value):
"""Implement the algorithm for `type: repeating`."""
return symbols[value % len(symbols)]
return symbols[(value - 1) % len(symbols)]
@register_formatter