HomePhabricator

Added capability to assign levels for counters

Description

Added capability to assign levels for counters

Added unit tests for new levels.

The following wikitext:
{{#counter:list-with-levels|level prefix=:}} Start lev 1
{{#counter:}} Stay lev 1
{{#counter:|level=2}} Jump to lev 2
{{#counter:}} Stay lev 2
{{#counter:|level=1}} Drop to lev 1
{{#counter:|level=2}} back to lev 2
{{#counter:|level=3}} jump to lev 3

Results in:
:1
:2
::1
::2
:3
::1
:::1

This allows you to have hierarchical lists. Furthermore,
if you add "format=outline" to the first #counter you can
get output like:

:1
:2
::2.1
::2.2
:3
::3.1
:::3.1.1

Change-Id: If8f16fa961b0ec730d7dc38c6b885f7ec290bd47

Event Timeline