Sorry, the last message had confusing errors and many language
mistakes. I repost the entire thing.
I'm modifying the SML coloring to work for Haskell.
I want to create an outline element for each line on which the text
starts at
the first column, and capture the first word. I use the following
regex
to do this:
<regexp match="/^(?{def:Outlined}[_\w]+)/ix"/>
This seems to work reasonably well. Except that most of the time one
function gets nested inside the previous in the outline.
Like this:
fn1 :: a -> a
fn1 a = ...
fn1 b = ...
fn2 :: a -> a
fn2 a = ...
fn2 b = ...
Outline:
fn1
fn1
f1
f2
f2
f2
I would expect to have them on the same level. I can't for my life