DominoWiki - Feature Request: Add Indenting Markup Created on |
Nov 7, 2007 |
Created by |
Dave Parillo |
Status |
Submitted |
I like the simple markup mediawiki uses to control indenting paragraphs. I added a function to the WikiPage.class to convert ':' to div tags. Multiple :'s result in larger div margins.
' Indent 2em spaces for each colon found at the beginning of a line
' param txt - the whole wiki page text
' param amount - the number of :'s to search for
Private Function doIndent (txt As String, amount As Integer) As String
doIndent = ReplaceRangeEnds(txt, Chr(10) & Ustring(amount, ":"), Chr(10), _
"<div style='margin-left: " & (2 * amount) & "em'>" , " </div>" , "*" , True)
End Function
doIndent is called from parseIndent which just calls doIndent in a loop, processing most colons first.
I can't say I totally understand the ReplaceRangeEnds function. As written, this only properly indents adjacent paragraphs (with the same indent level) if there is an intervening blank line. i.e.
: Level 1
: Level A
Fails to indent level A. Ah well.
Taken Actions by OwnersNo actions have been taken yet.Documents