Comments (8)
Adding code ||= ''
to Rocco::Layout#sections
fixes the problem, but I bet there's an underlying cause I'm not seeing.
from rocco.
I'm seeing the same issue with some Python files I'm running Rocco on. The simplest test case I could find was:
""":
"""
f
from rocco.
Possibly the same as #40
from rocco.
/home/zpatten/.rvm/gems/ree-1.8.7-2011.03/gems/rocco-0.7/lib/rocco/layout.rb:30:in `sections': undefined method `empty?' for nil:NilClass (NoMethodError)
from /home/zpatten/.rvm/gems/ree-1.8.7-2011.03/gems/rocco-0.7/lib/rocco/layout.rb:20:in `map'
from /home/zpatten/.rvm/gems/ree-1.8.7-2011.03/gems/rocco-0.7/lib/rocco/layout.rb:20:in `sections'
from /home/zpatten/.rvm/gems/ree-1.8.7-2011.03/gems/mustache-0.99.4/lib/mustache/context.rb:135:in `[]'
I'm seeing this issue with some Ruby files in a Rails lib folder. Default Rocco, no customization.
from rocco.
Did this commit fix the issue for you guys?
I'm shipping out an 0.8 release that includes it now.
from rocco.
Sadly, I can't say for sure. We had to remove Rocco because it kept causing the following error in our application (see #45):
ArgumentError: wrong number of arguments (0 for 1)
[PROJECT_ROOT]/vendor/bundle/ruby/1.8/gems/activerecord-2.3.10/lib/active_record/named_scope.rb, line 186
We tried moving Rocco to its own bundler group, but that didn't help.
from rocco.
I encountered this error running against our (large) code base. This completely resolved the issue for us.
from rocco.
No, the issue remains. The test case I gave above still produces the error.
from rocco.
Related Issues (20)
- pygments.appspot.com shutting down HOT 1
- best way to use rocco programmatically? HOT 1
- Do the tests all pass? (or... is there CI?)
- Refactor: extract reusable classes
- README should indicate this project is abandoned HOT 1
- Running rocco against an HTML file without specifiying the -o flag overwrites the file
- jruby doesn't support fork
- XML: Indented multiparagraph comments are sometimes rendered as Markdown code
- 'uninitialized constant Rocco' HOT 34
- Displays nothing when file contains no comments
- Unit test for ISO-8859-1 breaks under Ruby 1.9.3 HOT 3
- Redcarpet does not format docblocks properly HOT 4
- Rocco ignores JS code/comments HOT 5
- Can't specify comments? HOT 3
- Rocco + Redcarpet != Codeblock
- Markdown <ul><li>'s get flattened HOT 2
- Comments on the right-hand side?
- Has this project become code rot? HOT 1
- upstream css moved and broke demo site HOT 7
- Docco changed file location of stylesheet HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocco.