
Rendering of lists is broken using JRuby
Reported by Peter Severin | November 23rd, 2008 @ 07:42 AM | in 4.1.9
Ordered and unordered lists are rendered by putting each item in its own
- Item 1
- Item 2
- Item 3
Should be:
- Item 1
- Item 2
- Item 3
Comments and changes to this ticket
-
Peter Severin November 23rd, 2008 @ 07:44 AM
Couldn't get the formatting right the first time.
Ordered and unordered lists are rendered by putting each item in its own <ul> or <ol>. Like this: <ul><li>Item 1</li></ul> <ul><li>Item 2</li></ul> <ul><li>Item 3</li></ul>
Should be: <ul> <li>Item 1</li> <li>Item 3</li> <li>Item 3</li> </ul>
-
Peter Severin November 23rd, 2008 @ 09:51 AM
Please ignore this bug. It was my fault, there was an additional newline generated between items. Everything works as expected now. I thought I was onto something as I saw that there is a list formatted the same way on this page: http://whytheluckystiff.net/ruby...
-
gnagy November 25th, 2008 @ 08:35 AM
- Title changed from Rendering of lists is broken to Rendering of lists is broken using JRuby
Lists (both numbered and unordered) have a problem... The error is VERY lengthy, so I will only include the top 15 lines or so. Here is the text I'm parsing with RedCloth:
A Title
- List ** List subitem
Here is the code used to parse the text:
RedCloth.new(@page.content).to_html
Here is the error I'm receiving:
Exception in thread "Thread-52" java.lang.NoSuchMethodError: org.jruby.RubyArray.pop(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
at
RedclothScanService$Base.LIST_CLOSE(RedclothScanService.java:71)
at
RedclothScanService$Transformer.transform(RedclothScanService.java:7963)
at RedclothScanService.transform(RedclothScanService.java:8307) at RedclothScanService.transform2(RedclothScanService.java:8317) at RedclothScanService.to(RedclothScanService.java:8331) at
RedclothScanService$s_method_1_0$RUBYINVOKER$to.call(RedclothScanService$s_method_1_0$RUBYINVOKER$to.gen)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:391)
at
org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101) at org.jruby.ast.BlockNode.interpret(BlockNode.java:67) at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:163)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:140)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:211)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:340)
It seems that definition lists work fine, as does everything else that I have tested. Here is some info about my environment:
JRuby 1.1.4 (using Netbeans 6.5 RC2) Ruby version 1.8.6 (java) RubyGems version 1.2.0 RedCloth 4.1.1
The same code above works fine with RedCloth 3.0.4.
-
Jason Garber December 3rd, 2008 @ 11:23 AM
- State changed from new to resolved
Your problem is JRuby 1.1.4. Upgrade to JRuby 1.1.5 and you'll be set.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
RedCloth is a Ruby library for converting Textile into HTML