Header sections will get a descriptive hash anchor: rather than
`section-1`, the section will be given an id containing the header text
with spaces stripped and replaced with `_`. `section-Header_Goes_Here`
for instance.
Thanks to [Luke Andrew][1] for the initial work on this patch.
[1]: https://github.com/zyx
Adding a dependency on `Pathname`, which provides the excellent
`relative_path_from` method. That happens to be exactly what's needed
to fix the pathnames for the source jumplist issue that [Topfunky][]
reported.
Closes GH-26.
[Topfunky]: https://github.com/topfunky
Languages without single-line comments (CSS) explode when running
through `highlight`, as the `DIVIDER` mechanism doesn't deal well with
`nil` comment characters. I've reworked the mechanism such that it
uses multi-line comments when single-line comments aren't available.
That is:
def function:
"""
This is a comment
with _lots_ of leading
space! OMG!
"""
pass
Will parse into:
[
[
[ "This is a comment",
"with _lots_ of leading",
"space! OMG!"
],
...
]
]
Block comments are parsed out, but the commentchar removal isn't working
yet. I'll refactor that code out of it's current home, and move it into
`parse`, as I need to know what _kind_ of comment it is that I'm
stripping. Carrying that metadata around doesn't make any sense, so
I'll just convert the comment on the fly into a set of non-comment
strings.
I'm a bit loath to change the rendering entirely without talking to
Ryan, but I'd really prefer to replicate Docco's CSS file generation
rather than hotlinking out to the GitHub-hosted version. Offline
support would require it, if for no other reason...
Closes GH-23. Thanks to [Myles Byrne](http://www.myles.id.au/)