Permalink
Switch branches/tags
Commits on Nov 23, 2010
Commits on Nov 22, 2010
  1. Merge branch 'blockcomments'

    mikewest committed Nov 22, 2010
  2. Normalizing leading space in comments

    mikewest committed Nov 22, 2010
    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!"
                ],
                ...
            ]
        ]
  3. Block comment parsing: basics.

    mikewest committed Nov 22, 2010
    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.
Commits on Nov 21, 2010
  1. Adding Ruby block comment syntax.

    mikewest committed Nov 21, 2010
    Working towards GH-22.
  2. Really fixing extensionless file support

    vast committed with mikewest Oct 24, 2010
    Pieced together a fix using Regex and `File.extname` from http://github.com/vast/rocco
    
    Closes GH-24.
  3. Locking the CSS file down to Docco's v0.3.0

    mikewest committed Nov 21, 2010
    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/)
Commits on Oct 24, 2010
Commits on Oct 21, 2010
  1. Skipping Python/Ruby 1.9 source encoding

    mikewest committed Oct 21, 2010
    In the same way that it makes sense to skip the shebang (#!) line in
    scripts, it makes sense to skip the encoding definition in Python files
    (described by [PEP 263][p]) and Ruby 1.9 files (similar enough syntax
    that it's not worth worrying about.
    
    [p]: http://www.python.org/dev/peps/pep-0263/
Commits on Oct 20, 2010
  1. Merge branch 'language'

    mikewest committed Oct 20, 2010
  2. Autopopulate comment_chars for known languages

    mikewest committed Oct 20, 2010
    Adding comment characters for bash, c, c++, coffee script, java, javascript, lua, python, ruby, and scheme.  Paving the way for block-comment parsing later on...
    
    Closes issue #20.
  3. Attempt to autodetect file language

    mikewest committed Oct 20, 2010
    `pygmentize` 1.0+ has an `-N` option that attempts to match a file (via
    the extension) to a language lexer.  If `pygmentize` is installed, we'll
    run it with this option to get a language.
    
    If no language is detected, `pygmentize -N` returns `text`.  In that case,
    we'll first look for a user-provided language to use as a fallback.  If no
    language was provided, highlight using `ruby` as a reasonable default.
    
    Closes issue #19.
  4. Typo: Closes issue #11

    mikewest committed Oct 20, 2010
    Thanks to Paul Chavard ( http://github.com/tchak ) for
    the report and fix.
Commits on Oct 19, 2010
  1. Specify encoding for Pygments

    mikewest committed Oct 19, 2010
    This closes issue #10, in theory, but I'm not completely happy with the
    behavior.  The output for both UTF-8 and ISO-8859-1 sources is arguably
    correct, but I think it'd be better to do some autodetecting of the file
    encoding, and explicitly convert everything to UTF-8 on input.  One
    option is the [`chardet` gem][gem], but I'm loath to add another
    dependency to Rocco...
    
    [gem]: http://rubygems.org/gems/chardet/versions/0.9.0
  2. Cleaning up tests after bugfix merges:

    mikewest committed Oct 19, 2010
    As a result of fixing issue #15, a few tests broken.  This commit brings
    the tests up to date with the latest behavior.
  3. task :default => :test

    rtomayko committed Oct 19, 2010
  4. Merge remote branch 'mikewest/template'

    rtomayko committed Oct 19, 2010
    Conflicts:
    	lib/rocco.rb
Commits on Oct 17, 2010
  1. Adding a basic test suite.

    mikewest committed Oct 17, 2010
  2. Variables for use in Mustache templates.

    mikewest committed Oct 17, 2010
    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.
  3. Adding CLI argument `template`

    mikewest committed Oct 17, 2010
    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.
Commits on Oct 14, 2010
  1. Fixing (among other things) alternate header syntax

    mikewest committed Oct 14, 2010
    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.
  2. Fixing code highlighting in bash mode

    mikewest committed Oct 14, 2010
    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.
  3. Integrate `pilcrow` change from Docco

    mikewest committed Oct 14, 2010
    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]:
    http://github.com/jashkenas/docco/commit/f8a88d66b381a1c04358fa9ef31dd58871b22dd6
Commits on Sep 10, 2010
  1. 0.5 release

    rtomayko committed Sep 10, 2010
Commits on Apr 3, 2010
Commits on Apr 2, 2010
  1. avoid which(1)

    rtomayko committed Apr 2, 2010