Added:
* `docs?`: True if `docs` contains text of any sort, False if
it's empty.
* `code?`: True if `code` contains text of any sort, False if
it's empty.
* `empty?`: True if both `code` and `docs` are empty. False
otherwise.
* `header?`: True if `docs` contains _only_ a HTML header. False
otherwise.
In v0.5, the Mustache template is hardcoded as
`./lib/rocco/layout.mustache`. This makes it quite difficult to
style generated content as one must edit the layout file inside the
gem itself to make changes.
I propose leaving that file as a sensible default, but allowing the user
to specify an absolute or relative (to the current working directory)
path to a mustach template of her choosing. That's implemented in this
commit.
The following works in Docco, but not in Rocco:
Level 1 Heading
===============
Level 2 Heading
---------------
Happily, the fix is trivial. In Docco, the regex for comments is:
# Does the line begin with a comment?
l.comment_matcher = new RegExp('^\\s*' + l.symbol + '\\s?')
Changing Rocco's comment pattern to:
@comment_pattern = Regexp.new("^\\s*#{@options[:comment_chars]}\s?")
Solves the problem for me.
Rocco splits against `<span class="c.">`, which works fine for Ruby
where the `span` has a class of `c1`, but fails for Bash (and probably
other languages), where the `span` has a class of `c`. The fix is
trivial.
Rocco uses the Docco CSS directly, so when they make an update to the
HTML/CSS, Rocco needs to play along. In this case, Docco changed from
`#` to `¶`, and changed classnames as well (in
[f8a88d66b381a1c04358][]).
This commit migrates that change to Rocco.
[f8a88d66b381a1c04358]:
f8a88d66b3