Skip to content

Handle <ol start=…> #59

@gnprice

Description

@gnprice

An <ol> element in Zulip HTML can have the start attribute, like so:

<ol start="9999">
<li>Fjfjdj</li>
<li>Fjdjdj</li>
</ol>

On Zulip web, this renders like so:
image

(The fact that the numbers are cut off at the left is a bug that's getting fixed: zulip/zulip#25063.)

Currently we ignore start and always start the numbering at 1. We should instead respect start when we see it.

This means:

  • When we parse the HTML, ListNode should get a bit more information to record start. Possibly make it abstract and give it subclasses OrderedListNode and UnorderedListNode, since start won't make sense on the latter.
  • Then ListNodeWidget should act on that information.

Metadata

Metadata

Assignees

Labels

a-contentParsing and rendering Zulip HTML content, notably message contentsbeta feedbackThings beta users have specifically asked forhelp wanted

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions