docco
docco copied to clipboard
Headers aren't well aligned with code in parallel mode
I'm using headers to create sections, but the margins on them makes it look like I'm referring to the 2nd line of the code.
Are we generally discouraged from using headers, or is there some trick I'm missing?

No, we should be aligning them as best we can. Sometimes the box model can make it tricky, depending on what goes above. Feel free to send a patch if you like.
Ah cool. Will do.
+1 just ran into this as well:
I ran into this a while back. Changing
## Header
to
Header
------
fixed it. Only works for h1 and h2 though, but that was enough for me. There's a difference in how docco parses these syntaxes. Changing
save() if /^(---+|===+)$/.test line
to
save() if /^(---+|===+)$/.test(line) || /^#+\s/.test(line)
makes for more consistent behaviour, but will cause formatting to change for some people.
- Felix