From e02cfc1c574f37a2e76098f3b21a0f0a12f65eb4 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Fri, 17 Mar 2023 16:10:14 +0100 Subject: [PATCH] Allow unicode characters as bullets --- src/z3c/rml/list.py | 7 +++++-- src/z3c/rml/tests/input/rml-examples-046-lists.rml | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/z3c/rml/list.py b/src/z3c/rml/list.py index 5549181..0f5164f 100644 --- a/src/z3c/rml/list.py +++ b/src/z3c/rml/list.py @@ -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) diff --git a/src/z3c/rml/tests/input/rml-examples-046-lists.rml b/src/z3c/rml/tests/input/rml-examples-046-lists.rml index 050d2ff..97378a0 100644 --- a/src/z3c/rml/tests/input/rml-examples-046-lists.rml +++ b/src/z3c/rml/tests/input/rml-examples-046-lists.rml @@ -155,6 +155,10 @@ symbol.
  • para 1
  • para 2another paragraph
  • para 3
  • +
  • Disc
  • +
  • Right arrow head
  • +
  • Bullet, defined by unicode code point
  • +