Page MenuHomePhabricator

[remarkup] Allow specifying start number of an ordered list
Closed, ResolvedPublic

Description

Modify https://secure.phabricator.com/diffusion/PHU/browse/master/src/markup/engine/remarkup/blockrule/PhutilRemarkupListBlockRule.php to support a syntax like

#(100) Now the list starts at 100
#(105) this does nothing, because it's not the first node
# a
# b

That would render to:

100. Now the list starts at 100
101. this does nothing, because it's not the first node
102. a
103. b

Event Timeline

Thirtyate claimed this task.
Thirtyate raised the priority of this task from to Needs Triage.
Thirtyate updated the task description. (Show Details)

I already have this implemented using the start attribute of <ol> I'm wondering if this seems like a reasonable syntax before I put up a diff?

I'll accept a patch for this which allows lists in this style:

1. item
2. item

...to start with a number larger than "1". We currently require these lists start at "1" out of fear of false positives. If we make this change and then get complains about false positives with this syntax, I'll revert the change. I don't think this feature is useful enough to support in the upstream with weird syntax like # (101), or if the natural 123. syntax creates false positives in practice.