Skip to content

Commit

Permalink
Allow unicode characters as bullets
Browse files Browse the repository at this point in the history
  • Loading branch information
regebro committed Mar 17, 2023
1 parent 2d821f7 commit e02cfc1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/z3c/rml/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ class OrderedListItem(ListItem):
class IUnorderedListItem(IListItem):
"""An ordered list item."""

value = attr.Choice(
value = attr.Combination(
title='Bullet Value',
description='The type of bullet character.',
choices=interfaces.UNORDERED_BULLET_VALUES,
value_types=(
attr.Choice(choices=interfaces.UNORDERED_BULLET_VALUES),
attr.Text(max_length=1)
),
required=False)


Expand Down
4 changes: 4 additions & 0 deletions src/z3c/rml/tests/input/rml-examples-046-lists.rml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ symbol.</para>
<li><para style="normal">para 1</para></li>
<li><para style="normal">para 2</para><para style="normal">another paragraph</para></li>
<li value="circle" bulletColor="green"><para style="normal">para 3</para></li>
<li value="&#x274d;"><para style="normal">Disc</para></li>
<li value="rarrowhead"><para style="normal">Right arrow head</para></li>
<li value="&#x2022;"><para style="normal">Bullet, defined by unicode code point</para></li>
</ul>

</story>
</document>

0 comments on commit e02cfc1

Please sign in to comment.