I honestly haven't had a chance to try out your solution, but here's the one I implemented. I didn't bother with numbered lists because given how infrequently we seem to use them, it just seemed easier to add <ol> to the safeHTML list.
Replacement parse lists uses multiple *'s to indicate indenting level:
Up to 10 levels are supported
Private Function parseLists (txt As String) As String<br/>
'** lines beginning with a * should be bullet lists - more *'s results in more indenting<br/>
Dim i As Integer<br/>
parseLists = doList (txt, 10)<br/>
For i = 9 To 1 Step -1<br/>
parseLists = doList (parseLists, i) <br/>
Next<br/>
End Function<br/>
<br/>
' Create list items for each * found at the beginning of a line<br/>
' param txt - the whole wiki page text<br/>
' param amount - the number of bullets to search for<br/>
Private Function doList (txt As String, amount As Integer) As String<br/>
doList = ReplaceRangeEnds(txt, Chr(10) & Ustring(amount, "*"), Chr(10), _<br/>
Chr(10) & "<li class='level" & amount & "'>" , " </li>" & Chr(10), "*" , True) <br/>
<br/>
doList = ReplaceRangeEnds(doList, Chr(10) & Ustring(amount, "*"), Chr(10), _<br/>
"<li class='level" & amount & "'>" , " </li>", Chr(10) , False) <br/>
End Function<br/>
<br/>
To style your lists add entries to your style sheet - you'll mostly want to set the margin-left and the list-style. For example:
li {
padding: 0;<br/>
margin-bottom: 0;<br/>
margin-left: 2em;<br/>
list-style: square url("../webfiles/skin-monobook/$file/bullet.gif") outside;<br/>
}
ul li.level1, li.level5, li.level9 {
margin-left: 0em;<br/>
list-style: square url("../webfiles/skin-monobook/$file/bullet.gif") outside;<br/>
}
li.level2, li.level6, li.level10 {
margin-left: 3em;<br/>
list-style: circle none outside;<br/>
}
li.level3, li.level7 {
margin-left: 4em;<br/>
list-style: disc none outside;<br/>
}
li.level4, li.level8 {
margin-left: 5em;<br/>
list-style: square none outside;<br/>
}
li.level5 { margin-left: 6em;}
li.level6 { margin-left: 7em;}
li.level7 { margin-left: 8em;}
li.level8 { margin-left: 9em;}
li.level9 { margin-left: 10em;}
li.level10{ margin-left: 11em;}