It seems the existing markdown function list is really not helpful, as it groups h1s, h2s, h3s together rather than nesting h2s under h1s, h3s under h2s etc.
I don't think anyone pictures a document like this when they use nested headings..
I was trying to work out how to nest them properly. It seems I cannot use the next h1 as a delimiter for finding nested headings..
I could introduce artificial constructs like looking for "#end" as the closing delimiter, but that introduces a lot of problems and makes it much harder to write markdown naturally.
Any ideas?
Rob
Code: Select all
# First heading
Some text
## Sub-heading 2nd level
Some text
### Sub-heading 3rd level
Some text
# Second heading
Some text
# Third heading
Some text
I was trying to work out how to nest them properly. It seems I cannot use the next h1 as a delimiter for finding nested headings..
Code: Select all
/TGBegin "Heading 1"
/TGFindStr = "%# ^(?+^)$"
/TGFindStr = "%^(?+^)^p====+$"
/TGBegin "Heading 2"
/TGFindStr = "%## ^(?+^)$"
/TGFindBStart = "%# "
/TGFindBEnd = "%# "
/TGEnd
/TGEnd
Any ideas?
Rob