From lists at ruby-forum.com Tue Mar 4 03:18:43 2008 From: lists at ruby-forum.com (Nicolas V.) Date: Tue, 4 Mar 2008 09:18:43 +0100 Subject: Install / Build fail on OSX Server 10.5.2 In-Reply-To: <80c8b9bc31098813e0b45cef8826bf88@ruby-forum.com> References: <80c8b9bc31098813e0b45cef8826bf88@ruby-forum.com> Message-ID: Nicolas V. wrote: > Hello, > > I would like to install SuperRedCloth on my server, here is the entire > log : > > gem install superredcloth --source http://code.whytheluckystiff.net > Building native extensions. This could take a while... > ERROR: Error installing superredcloth: > ERROR: Failed to build gem native extension. > > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby > extconf.rb install superredcloth --source > http://code.whytheluckystiff.net > checking for main() in -lc... yes > creating Makefile > > make > gcc -I. -I. > -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 > -I. -fno-common -arch ppc -arch i386 -Os -pipe -fno-common -c > superredcloth_inline.c > Out of stack space. > Try running 'ulimit -S -s unlimited' in the shell to raise its limit. > {standard input}:unknown:Undefined local symbol L_rb_hash_aref$stub > {standard input}:unknown:Undefined local symbol L_rb_num2long$stub > {standard input}:unknown:Undefined local symbol L_rb_int2inum$stub > {standard input}:unknown:Undefined local symbol L_rb_hash_aset$stub > {standard input}:unknown:Undefined local symbol L_rb_str_cat$stub > {standard input}:unknown:Undefined local symbol L_rb_str_cat2$stub > Out of stack space. > Try running 'ulimit -S -s unlimited' in the shell to raise its limit. > {standard input}:unknown:Undefined local symbol L_rb_hash_aref$stub > {standard input}:unknown:Undefined local symbol L_rb_num2long$stub > {standard input}:unknown:Undefined local symbol L_rb_int2inum$stub > {standard input}:unknown:Undefined local symbol L_rb_hash_aset$stub > {standard input}:unknown:Undefined local symbol L_rb_str_cat$stub > {standard input}:unknown:Undefined local symbol L_rb_str_cat2$stub > lipo: can't open input file: /var/tmp//cc3JKHGQ.out (No such file or > directory) > make: *** [superredcloth_inline.o] Error 1 > > > Gem files will remain installed in > /Library/Ruby/Gems/1.8/gems/superredcloth-1.160 for inspection. > Results logged to > /Library/Ruby/Gems/1.8/gems/superredcloth-1.160/ext/superredcloth_scan/gem_make.out > > ..... Ok, so I have reported this issue to the bugreport of apple, and after some test (gcc -E ....) here is the solution : 1 - install GCC 4.2 Preview 1 (http://connect.apple.com) 2 - update symlink of /usr/bin/gcc to /usr/bin/gcc-4.2 3 - gem install superredcloth --source http://code.whytheluckystiff.net Building native extensions. This could take a while... Successfully installed superredcloth-1.160 1 gem installed Installing ri documentation for superredcloth-1.160... Installing RDoc documentation for superredcloth-1.160... And voila ! issue solved. Hope it can help someone else. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Mar 7 12:02:19 2008 From: lists at ruby-forum.com (Hu Lili) Date: Fri, 7 Mar 2008 18:02:19 +0100 Subject: what are you like Message-ID: <3a82ebe041085e4983401b77ac4e3ec1@ruby-forum.com> on www.freightcn.com You can place drop shipping You can place sample order. You can place Bulk order. You can mix colors. It is our pleasure to meet you here. We are professional and honest wholesaler of all kinds of brand sneaks and apparel.the products our company supply are as follows: 1.james,kobe,Kate,Duncan,James,Garnet,McGrady,Wade shoes 2.jordan1-22,af1,duck shoes 3.airmax(90/95/97/360/2003/TN?)shoes 4.shox(R3/R4/NZ/turbo/t13/monster?)shoes 6.fashion branded hoodies/jeans/t-shirt/short/caps/handbag and others all the products on our website all are in stock! Because of the space of the website is limited,we can also supply many other products which be not showed out in our site. if you have the photos of the products you need , we are pleasure to supply for your orders. The opportunity from you will be appreciated and cherished! dont hesitate contact us by website: www.freightcn.com MSN : freightcn01 at hotmail.com [IMG]http://www.freightcn.com/img-1/logo.gif[/IMG] -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Mar 7 12:04:08 2008 From: lists at ruby-forum.com (Hu Lili) Date: Fri, 7 Mar 2008 18:04:08 +0100 Subject: what are you want Message-ID: <79636f9679d5fd8f93747e9a1dc60af7@ruby-forum.com> we wholesale brand handbags and purses,bape,chanel,chloe,coach,fendi,gucci,juicy,lv and so on, and other products:Jackets watches,sunglasses,belts,t-shirts,mobile phones,jeans ,shoes. we accept drop-shipping and bulk order,provide reasonable price,great quality,quickly delivering. welcome to visit our website and pls feel free to contact us soon. Website: http://www.freightcn.com/product_show4.asp?m_menu1=Women%20Air%20Jordan http://www.freightcn.com/product_show5.asp?m_menu2=Women%20Shox%20NZ http://www.freightcn.com/product_show5.asp?m_menu2=Bape%20Hoody http://www.freightcn.com/product_show4.asp?m_menu1=Chanel%20bags msn:freightcn01 at hotmail.com [IMG]http://www.freightcn.com/img-1/logo.gif[/IMG] -- Posted via http://www.ruby-forum.com/. From stephen.bannasch at deanbrook.org Mon Mar 10 00:34:50 2008 From: stephen.bannasch at deanbrook.org (Stephen Bannasch) Date: Mon, 10 Mar 2008 00:34:50 -0400 Subject: Question about entities In-Reply-To: References: Message-ID: At 6:07 PM -0500 2/21/08, Jason Garber wrote: >1.) What is everyone's preference on NCRs or character entities? > Textile 2 uses decimal NCRs, so a less-than character becomes < >whereas RedCloth (3.04 and prior) used <. What is your >preference? It gets tough because ' (a straight single quote) >doesn't have a character entity equivalent. > >2.) How do you feel about encoding characters like quotes in >blockcode and pre blocks? Textile 2 does it, but the old RedCloth >never did. Example: > >>This is some code, "isn't it". >> > >under Textile 2 becomes > >>This is some code, "isn't it". >> > I prefer unicode character references rather than entities. See: http://rubyforge.org/pipermail/redcloth-upwards/2007-August/000161.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/redcloth-upwards/attachments/20080310/17a9e296/attachment.html From gaspard at teti.ch Mon Mar 10 06:30:15 2008 From: gaspard at teti.ch (Gaspard Bucher) Date: Mon, 10 Mar 2008 11:30:15 +0100 Subject: Question about entities In-Reply-To: References: Message-ID: <7a9f744a0803100330n37d3f115xe9cd443f76b1b0d8@mail.gmail.com> ENTITIES I think html entities are more readable in case someone reads the raw code, but as you mentioned, some cannot be escaped and need unicode character references. >From my needs, it does not really matter. Maybe consistency is good, then we have to go for unicode. A much more important thing is that this entity escaping should be optional. I wrote a "to_latex" grammar and escaping entities is different in LateX. I proposed a patch that tried to make as little changes to the overall design as possible (http://code.whytheluckystiff.net/redcloth/ticket/35). But in essence, I think there should be some universal hooks to do this kind of escaping. I would propose the following hooks: pre: before anything happens escape: before raw text is written out (entity escaping in html for example) post: after parsing It would then be easy to alter the grammar for HTML by writing: class << SuperRedCloth::HTML def escape(text) html_unicode_escape(text) end end The method "html_entity_escape" would be the C function "rb_str_cat_escaped", "html_unicode_escape" could be another C function so there is no speed loss. The "pre" and "post" hooks could be used to extract custom tags and put the parsed result back after parsing. The interest of having them "inside" RedCloth is that we can alter the extracted data during parsing. This might seem mad, but it might be the only way to solve footnotes or tables when producing latex output without parsing the whole text once more. CODE ESCAPING This seems bad to me. Code should be as raw material as possible. It would be terrible to write code in ASCII and put it on a website. A user makes a copy of the code and finds himself with utf-8 data that doesn't compile just because of quotes that look pretty but have no meaning in the language the code was written in. Ok, that's it. Gaspard 2008/3/10, Stephen Bannasch : > > > At 6:07 PM -0500 2/21/08, Jason Garber wrote: > 1.) What is everyone's preference on NCRs or character entities? Textile 2 > uses decimal NCRs, so a less-than character becomes < whereas RedCloth > (3.04 and prior) used <. What is your preference? It gets tough because > ' (a straight single quote) doesn't have a character entity equivalent. > > > 2.) How do you feel about encoding characters like quotes in blockcode and > pre blocks? Textile 2 does it, but the old RedCloth never did. Example: > > > This is some code, "isn't it". > > > > under Textile 2 becomes > > > This is some code, "isn't it". > > > > > > I prefer unicode character references rather than entities. > > > See: > http://rubyforge.org/pipermail/redcloth-upwards/2007-August/000161.html > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > From jg at jasongarber.com Mon Mar 10 18:02:53 2008 From: jg at jasongarber.com (Jason Garber) Date: Mon, 10 Mar 2008 18:02:53 -0400 Subject: Only 5 tests out of 376 currently failing! Message-ID: <01901733-76F0-4144-9B50-4EAEA367039D@jasongarber.com> Good news! SuperRedCloth is down to just five failing tests! I was down to 10 or so in mid-February but then I added test cases from "The official reference manual for Textile 2", which added 97 new tests, many of them failing. I'm happy to say, they're almost all passing now. Four of these last five I just need to check with you on before I deviate from Textile 2.0 (as published at Threshold State). >> name: nested pre tags >> in: |- >>
>>   
>>     Properly escaped here.
>>
>>     
>>       a = 1
>>     
>> >> Still in the pre. >>
>>
> > 1) Failure: > test_code_nested_pre_tags(TestParser) > [./test/helper.rb:54:in `assert_equal' > ./test/helper.rb:11:in `assert_html_equal' > ./test/test_parser.rb:16:in `test_code_nested_pre_tags']: > expected: "
  Properly escaped here.  <pre>    a =  
> 1  </pre>  Still in the pre.
" > but was: "
  Properly escaped here.  <pre>    a =  
> 1  
Still in the pre.


" I'm just too lazy to fix this. > 2) Failure: > test_threshold_footnotes(TestParser) > [./test/helper.rb:54:in `assert_equal' > ./test/helper.rb:11:in `assert_html_equal' > ./test/test_parser.rb:16:in `test_threshold_footnotes']: > expected: "

A footnote reference \"#fn1216642796463b1223ae29d\">1.

\"fn1216642796463b1223ae29d\" class=\"footnote\">1 The > footnote.

" > but was: "

A footnote reference1 sup>.

1 The footnote.

" > > 3) Failure: > test_threshold_modifier_without_whitespace_4(TestParser) > [./test/helper.rb:54:in `assert_equal' > ./test/helper.rb:11:in `assert_html_equal' > ./test/test_parser.rb:16:in > `test_threshold_modifier_without_whitespace_4']: > expected: "

A close\"\"image.
A > tighttextlink.
A href=\"http://thresholdstate.com/\">footnoted link \"footnote\">1.

" > but was: "

A close\"\"image.
A > tighttextlink.
A href=\"http://thresholdstate.com/\">footnoted link \"#fn1\">1.

" Evidently Textile 2 generates a unique id for footnotes, I assume so you can have different sections on one web page and their footnotes won't conflict as ids or named anchors. I could see how it could be desirable, though, to refer to a footnote and list it in different sections (rendered by RedCloth separately). What do you think? >> name: notextile tags >> desc: Blocks enclosed by the pseudo tag ... >> will be left untouched. >> in: |- >> >> p. Leave me alone >> >> out: |- >>

>> p. Leave me alone >>

>> note: This syntax is supported for backwards compatibility only, >> and doesn?t always work as expected. The block modifier notextile. >> should be used instead. > > 4) Failure: > test_threshold_notextile_tags(TestParser) > [./test/helper.rb:54:in `assert_equal' > ./test/helper.rb:11:in `assert_html_equal' > ./test/test_parser.rb:16:in `test_threshold_notextile_tags']: > expected: "

p. Leave me alone

" > but was: "p. Leave me alone" Here, even though it protects the contents of the tags, it wraps the whole thing in a

tag. I disagree, and so does RedCloth (why added the test for it at [141]. >> name: paragraphs partly enclosed in xhtml block tags >> desc: Paragraphs that are only partly enclosed in block tags will >> be enclosed in

...

tags. >> in:
inside
and outside. >> out:

inside
and outside.

> > 5) Failure: > test_threshold_paragraphs_partly_enclosed_in_xhtml_block_tags > (TestParser) > [./test/helper.rb:54:in `assert_equal' > ./test/helper.rb:11:in `assert_html_equal' > ./test/test_parser.rb:16:in > `test_threshold_paragraphs_partly_enclosed_in_xhtml_block_tags']: > expected: "

inside
and outside.

" > but was: "
inside

and outside.

" Isn't a div inside a p invalid? SRC is smart enough to not wrap a block element in a P tag. If that div were a span, SRC would enclose it just fine: > "

inside and outside.

" > 376 tests, 376 assertions, 5 failures, 0 errors Awesome. So, unless you tell me otherwise, I plan to: 1.) Stay lazy and throw away the test for nested pre tags. If someone has a problem with it, they'll complain and submit a patch. 2.) Leave footnotes with simple ids (no generated unique ids) 3.) Leave notextile tag handling as it was in RedCloth and is in SRC 4.) Stick with SRC's smarter handling of block tags in a paragraph Note: If you try compiling SRC trunk, you'll need to have Ragel newer than 6.0 (i.e. you'll need to check out the trunk). SRC uses leaving actions in scanners, which will be released in Ragel 6.1. Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/redcloth-upwards/attachments/20080310/b82ebd3f/attachment.html From gaspard at teti.ch Tue Mar 11 05:20:58 2008 From: gaspard at teti.ch (Gaspard Bucher) Date: Tue, 11 Mar 2008 10:20:58 +0100 Subject: Only 5 tests out of 376 currently failing! In-Reply-To: <01901733-76F0-4144-9B50-4EAEA367039D@jasongarber.com> References: <01901733-76F0-4144-9B50-4EAEA367039D@jasongarber.com> Message-ID: <7a9f744a0803110220q6d7dfbc5tc1cddda7942cb9be@mail.gmail.com> I agree with all the options. Baby needs (re)birth. On release, please add the generated c files to the gem to avoid ragel dependency. A 2Mb download is easier then installing ragel from svn ! Gaspard 2008/3/10, Jason Garber : > Good news! SuperRedCloth is down to just five failing tests! I was down to > 10 or so in mid-February but then I added test cases from "The official > reference manual for Textile 2", which added 97 new tests, many of them > failing. I'm happy to say, they're almost all passing now. > > Four of these last five I just need to check with you on before I deviate > from Textile 2.0 (as published at Threshold State). > > > > name: nested pre tags > in: |- >
>   
>     Properly escaped here.
>
>     
>       a = 1
>     
> > Still in the pre. >
>
> > > > 1) Failure: > test_code_nested_pre_tags(TestParser) > [./test/helper.rb:54:in `assert_equal' > ./test/helper.rb:11:in `assert_html_equal' > ./test/test_parser.rb:16:in `test_code_nested_pre_tags']: > expected: "
  Properly escaped here.  <pre>    a = 1
> </pre>  Still in the pre.
" > but was: "
  Properly escaped here.  <pre>    a = 1  
> Still in the pre.


" > > I'm just too lazy to fix this. > > > 2) Failure: > test_threshold_footnotes(TestParser) > [./test/helper.rb:54:in `assert_equal' > ./test/helper.rb:11:in `assert_html_equal' > ./test/test_parser.rb:16:in `test_threshold_footnotes']: > expected: "

A footnote reference href=\"#fn1216642796463b1223ae29d\">1.

id=\"fn1216642796463b1223ae29d\" class=\"footnote\">1 The > footnote.

" > but was: "

A footnote reference href=\"#fn1\">1.

1 > The footnote.

" > > 3) Failure: > test_threshold_modifier_without_whitespace_4(TestParser) > [./test/helper.rb:54:in `assert_equal' > ./test/helper.rb:11:in `assert_html_equal' > ./test/test_parser.rb:16:in > `test_threshold_modifier_without_whitespace_4']: > expected: "

A close\"\"image.
A tight href=\"http://thresholdstate.com/\">textlink.
A href=\"http://thresholdstate.com/\">footnoted link class=\"footnote\">1.

" > but was: "

A close\"\"image.
A tight href=\"http://thresholdstate.com/\">textlink.
A href=\"http://thresholdstate.com/\">footnoted link href=\"#fn1\">1.

" > > Evidently Textile 2 generates a unique id for footnotes, I assume so you can > have different sections on one web page and their footnotes won't conflict > as ids or named anchors. I could see how it could be desirable, though, to > refer to a footnote and list it in different sections (rendered by RedCloth > separately). What do you think? > > > > name: notextile tags > desc: Blocks enclosed by the pseudo tag ... will be > left untouched. > in: |- > > p. Leave me alone > > out: |- >

> p. Leave me alone >

> note: This syntax is supported for backwards compatibility only, and doesn't > always work as expected. The block modifier notextile. should be used > instead. > > > 4) Failure: > test_threshold_notextile_tags(TestParser) > [./test/helper.rb:54:in `assert_equal' > ./test/helper.rb:11:in `assert_html_equal' > ./test/test_parser.rb:16:in > `test_threshold_notextile_tags']: > expected: "

p. Leave me alone

" > but was: "p. Leave me alone" > > Here, even though it protects the contents of the tags, it wraps > the whole thing in a

tag. I disagree, and so does RedCloth (why added > the test for it at [141]. > > > > name: paragraphs partly enclosed in xhtml block tags > desc: Paragraphs that are only partly enclosed in block tags will be > enclosed in

...

tags. > in:
inside
and outside. > out:

inside
and outside.

> > > 5) Failure: > test_threshold_paragraphs_partly_enclosed_in_xhtml_block_tags(TestParser) > [./test/helper.rb:54:in `assert_equal' > ./test/helper.rb:11:in `assert_html_equal' > ./test/test_parser.rb:16:in > `test_threshold_paragraphs_partly_enclosed_in_xhtml_block_tags']: > expected: "

inside
and outside.

" > but was: "
inside

and outside.

" > > Isn't a div inside a p invalid? SRC is smart enough to not wrap a block > element in a P tag. If that div were a span, SRC would enclose it just > fine: > "

inside and outside.

" > > 376 tests, 376 assertions, 5 failures, 0 errorsAwesome. > > So, unless you tell me otherwise, I plan to: > 1.) Stay lazy and throw away the test for nested pre tags. If someone has a > problem with it, they'll complain and submit a patch. > 2.) Leave footnotes with simple ids (no generated unique ids) > 3.) Leave notextile tag handling as it was in RedCloth and is in SRC > 4.) Stick with SRC's smarter handling of block tags in a paragraph > > Note: If you try compiling SRC trunk, you'll need to have Ragel newer than > 6.0 (i.e. you'll need to check out the trunk). SRC uses leaving actions in > scanners, which will be released in Ragel 6.1. > > Jason > > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > From gaspard at teti.ch Tue Mar 11 05:22:34 2008 From: gaspard at teti.ch (Gaspard Bucher) Date: Tue, 11 Mar 2008 10:22:34 +0100 Subject: Only 5 tests out of 376 currently failing! In-Reply-To: <7a9f744a0803110220q6d7dfbc5tc1cddda7942cb9be@mail.gmail.com> References: <01901733-76F0-4144-9B50-4EAEA367039D@jasongarber.com> <7a9f744a0803110220q6d7dfbc5tc1cddda7942cb9be@mail.gmail.com> Message-ID: <7a9f744a0803110222i54c1a34anbf7b40086ec2a589@mail.gmail.com> PS: thanks for the great work ! Gaspard 2008/3/11, Gaspard Bucher : > I agree with all the options. Baby needs (re)birth. > > On release, please add the generated c files to the gem to avoid ragel > dependency. A 2Mb download is easier then installing ragel from svn ! > > Gaspard > > 2008/3/10, Jason Garber : > > > Good news! SuperRedCloth is down to just five failing tests! I was down to > > 10 or so in mid-February but then I added test cases from "The official > > reference manual for Textile 2", which added 97 new tests, many of them > > failing. I'm happy to say, they're almost all passing now. > > > > Four of these last five I just need to check with you on before I deviate > > from Textile 2.0 (as published at Threshold State). > > > > > > > > name: nested pre tags > > in: |- > >
>  >   
>  >     Properly escaped here.
>  >
>  >     
>  >       a = 1
>  >     
> > > > Still in the pre. > >
> >
> > > > > > > > 1) Failure: > > test_code_nested_pre_tags(TestParser) > > [./test/helper.rb:54:in `assert_equal' > > ./test/helper.rb:11:in `assert_html_equal' > > ./test/test_parser.rb:16:in `test_code_nested_pre_tags']: > > expected: "
  Properly escaped here.  <pre>    a = 1
>  > </pre>  Still in the pre.
" > > but was: "
  Properly escaped here.  <pre>    a = 1  
> > Still in the pre.


" > > > > I'm just too lazy to fix this. > > > > > > 2) Failure: > > test_threshold_footnotes(TestParser) > > [./test/helper.rb:54:in `assert_equal' > > ./test/helper.rb:11:in `assert_html_equal' > > ./test/test_parser.rb:16:in `test_threshold_footnotes']: > > expected: "

A footnote reference > href=\"#fn1216642796463b1223ae29d\">1.

> id=\"fn1216642796463b1223ae29d\" class=\"footnote\">1 The > > footnote.

" > > but was: "

A footnote reference > href=\"#fn1\">1.

1 > > The footnote.

" > > > > 3) Failure: > > test_threshold_modifier_without_whitespace_4(TestParser) > > [./test/helper.rb:54:in `assert_equal' > > ./test/helper.rb:11:in `assert_html_equal' > > ./test/test_parser.rb:16:in > > `test_threshold_modifier_without_whitespace_4']: > > expected: "

A close\"\"image.
A tight > href=\"http://thresholdstate.com/\">textlink.
A > href=\"http://thresholdstate.com/\">footnoted link > class=\"footnote\">1.

" > > but was: "

A close\"\"image.
A tight > href=\"http://thresholdstate.com/\">textlink.
A > href=\"http://thresholdstate.com/\">footnoted link > href=\"#fn1\">1.

" > > > > Evidently Textile 2 generates a unique id for footnotes, I assume so you can > > have different sections on one web page and their footnotes won't conflict > > as ids or named anchors. I could see how it could be desirable, though, to > > refer to a footnote and list it in different sections (rendered by RedCloth > > separately). What do you think? > > > > > > > > name: notextile tags > > desc: Blocks enclosed by the pseudo tag ... will be > > left untouched. > > in: |- > > > > p. Leave me alone > > > > out: |- > >

> > p. Leave me alone > >

> > note: This syntax is supported for backwards compatibility only, and doesn't > > always work as expected. The block modifier notextile. should be used > > instead. > > > > > > 4) Failure: > > test_threshold_notextile_tags(TestParser) > > [./test/helper.rb:54:in `assert_equal' > > ./test/helper.rb:11:in `assert_html_equal' > > ./test/test_parser.rb:16:in > > `test_threshold_notextile_tags']: > > expected: "

p. Leave me alone

" > > but was: "p. Leave me alone" > > > > Here, even though it protects the contents of the tags, it wraps > > the whole thing in a

tag. I disagree, and so does RedCloth (why added > > the test for it at [141]. > > > > > > > > name: paragraphs partly enclosed in xhtml block tags > > desc: Paragraphs that are only partly enclosed in block tags will be > > enclosed in

...

tags. > > in:
inside
and outside. > > out:

inside
and outside.

> > > > > > 5) Failure: > > test_threshold_paragraphs_partly_enclosed_in_xhtml_block_tags(TestParser) > > [./test/helper.rb:54:in `assert_equal' > > ./test/helper.rb:11:in `assert_html_equal' > > ./test/test_parser.rb:16:in > > `test_threshold_paragraphs_partly_enclosed_in_xhtml_block_tags']: > > expected: "

inside
and outside.

" > > but was: "
inside

and outside.

" > > > > Isn't a div inside a p invalid? SRC is smart enough to not wrap a block > > element in a P tag. If that div were a span, SRC would enclose it just > > fine: > > "

inside and outside.

" > > > > 376 tests, 376 assertions, 5 failures, 0 errorsAwesome. > > > > So, unless you tell me otherwise, I plan to: > > 1.) Stay lazy and throw away the test for nested pre tags. If someone has a > > problem with it, they'll complain and submit a patch. > > 2.) Leave footnotes with simple ids (no generated unique ids) > > 3.) Leave notextile tag handling as it was in RedCloth and is in SRC > > 4.) Stick with SRC's smarter handling of block tags in a paragraph > > > > Note: If you try compiling SRC trunk, you'll need to have Ragel newer than > > 6.0 (i.e. you'll need to check out the trunk). SRC uses leaving actions in > > scanners, which will be released in Ragel 6.1. > > > > Jason > > > > > > > _______________________________________________ > > Redcloth-upwards mailing list > > Redcloth-upwards at rubyforge.org > > http://rubyforge.org/mailman/listinfo/redcloth-upwards > > > From work at whatcould.com Tue Mar 11 11:55:19 2008 From: work at whatcould.com (David Reese) Date: Tue, 11 Mar 2008 10:55:19 -0500 Subject: Only 5 tests out of 376 currently failing! In-Reply-To: <01901733-76F0-4144-9B50-4EAEA367039D@jasongarber.com> References: <01901733-76F0-4144-9B50-4EAEA367039D@jasongarber.com> Message-ID: <47D6AB67.5010105@whatcould.com> i'm just a forum lurker (no ragel skillz here), but my input -- > 2.) Leave footnotes with simple ids (no generated unique ids) I agree -- really, if you've got two footnotes marked "n1" on the same page, you've already got problems from a user's perspective. adding the unique ids makes the page happy (unique html IDs) but not the user (um, which footnote 1 is this?). > 4.) Stick with SRC's smarter handling of block tags in a paragraph yay, this is one of the things that always bothered me about RC (and various PHP textile implementations). i can't tell you how excited i am that we'll have a proper (test-passing) redcloth. thanks for pushing this along jason ... we owe you. d From jg at jasongarber.com Tue Mar 11 15:31:04 2008 From: jg at jasongarber.com (Jason Garber) Date: Tue, 11 Mar 2008 15:31:04 -0400 Subject: Question about entities In-Reply-To: <7a9f744a0803100330n37d3f115xe9cd443f76b1b0d8@mail.gmail.com> References: <7a9f744a0803100330n37d3f115xe9cd443f76b1b0d8@mail.gmail.com> Message-ID: This idea about hooks is a good one. I'd wished for it myself when outputting HTML vs. XHTML (because while
works, it isn't truly valid HTML) A patch to do this would be most welcome! Jason On Mar 10, 2008, at 6:30 AM, Gaspard Bucher wrote: > But in essence, > I think there should be some universal hooks to do this kind of > escaping. I would propose the following hooks: > > pre: before anything happens > escape: before raw text is written out (entity escaping in html for > example) > post: after parsing > > It would then be easy to alter the grammar for HTML by writing: > > class << SuperRedCloth::HTML > def escape(text) > html_unicode_escape(text) > end > end > > The method "html_entity_escape" would be the C function > "rb_str_cat_escaped", "html_unicode_escape" could be another C > function so there is no speed loss. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/redcloth-upwards/attachments/20080311/1d1f20ce/attachment.html From gaspard at teti.ch Tue Mar 11 17:24:55 2008 From: gaspard at teti.ch (Gaspard Bucher) Date: Tue, 11 Mar 2008 22:24:55 +0100 Subject: Question about entities In-Reply-To: References: <7a9f744a0803100330n37d3f115xe9cd443f76b1b0d8@mail.gmail.com> Message-ID: <7a9f744a0803111424r2e5fcbeeuc8adc4db85132d54@mail.gmail.com> I will start by referencing the parts in the parser that are specific to HTML and are not covered by the ruby methods ("def p", "def h1", etc) and also the parts that could need a 2 step parsing (1 build a tree, 2 render) typically parts that need some knowledge of what is coming further down before we can render them (footnotes, tables). >From this list we can discuss the best ways to enable multiple outputs without loosing speed. Gaspard 2008/3/11, Jason Garber : > This idea about hooks is a good one. I'd wished for it myself when > outputting HTML vs. XHTML (because while
works, it isn't truly valid > HTML) > > A patch to do this would be most welcome! > > Jason > > > On Mar 10, 2008, at 6:30 AM, Gaspard Bucher wrote: > > > But in essence, > > I think there should be some universal hooks to do this kind of > > escaping. I would propose the following hooks: > > > > > pre: before anything happens > > escape: before raw text is written out (entity escaping in html for example) > > post: after parsing > > > > > It would then be easy to alter the grammar for HTML by writing: > > > > > class << SuperRedCloth::HTML > > def escape(text) > > html_unicode_escape(text) > > end > > end > > > > > The method "html_entity_escape" would be the C function > > "rb_str_cat_escaped", "html_unicode_escape" could be another C > > function so there is no speed loss. > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > From jg at jasongarber.com Tue Mar 11 17:44:13 2008 From: jg at jasongarber.com (Jason Garber) Date: Tue, 11 Mar 2008 17:44:13 -0400 Subject: Question about entities In-Reply-To: <7a9f744a0803111424r2e5fcbeeuc8adc4db85132d54@mail.gmail.com> References: <7a9f744a0803100330n37d3f115xe9cd443f76b1b0d8@mail.gmail.com> <7a9f744a0803111424r2e5fcbeeuc8adc4db85132d54@mail.gmail.com> Message-ID: <5726649C-A653-47C3-803F-2F1E55AF8EE5@jasongarber.com> On Mar 11, 2008, at 5:24 PM, Gaspard Bucher wrote: > also the parts that could need a 2 step parsing (1 build a > tree, 2 render) typically parts that need some knowledge of what is > coming further down before we can render them (footnotes, tables). That would be really handy. Right now I re-parse the document if any link aliases were found and I assume that footnotes always come after they're referenced. Re-parsing isn't that slow, but it is unnecessary. Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/redcloth-upwards/attachments/20080311/ff1e17d0/attachment.html From jg at jasongarber.com Thu Mar 13 16:06:04 2008 From: jg at jasongarber.com (Jason Garber) Date: Thu, 13 Mar 2008 16:06:04 -0400 Subject: Whitespace in SuperRedCloth Message-ID: <6B7195FF-2F6F-412E-8EFA-844FC53A1FB3@jasongarber.com> Up to now, the tests have been running with whitespace stripped out. Newlines and tabs are insignificant in HTML, so I figured why bother with them? Now I realize why: they're significant in pre tags and they also make your code look pretty! I've been working to get SRC output to roughly match Tetxile2's as far as tabs and newlines go. It's tough and is adding a lot of messiness to the code! I'm close to done, but I'm not satisfied with the result. How about if we just ran the output through Tidy? Could we bundle the tidylib c files in so the user doesn't have to have tidylib installed separately? Will the license allow it? What do you all think? Jason From work at whatcould.com Fri Mar 14 00:32:40 2008 From: work at whatcould.com (David Reese) Date: Thu, 13 Mar 2008 23:32:40 -0500 Subject: Whitespace in SuperRedCloth In-Reply-To: <6B7195FF-2F6F-412E-8EFA-844FC53A1FB3@jasongarber.com> References: <6B7195FF-2F6F-412E-8EFA-844FC53A1FB3@jasongarber.com> Message-ID: <47D9FFE8.9060804@whatcould.com> Running everything through tidy seems superfluous to me -- if i had to vote, i'd say formatting the html all prettylike isn't that important, and isn't worth the added parsing time (and trying to get the right libs for the platform in the gem, etc). developers can call tidy in their own projects if they really want tidy html, right? is there a way you could: # retain whitespace between pre/code tags -- you'd want to do that even with tidy, since it won't always know how you want to format your code -- # and then do something simple with the HTML, like adding newlines after the end of closed block elments (

\n or \n\n)? maybe tabs before
  • elements or something, but not getting too fancy. I'm not sure they spent too much time in Textile2 trying to get the tabs the way they are -- trying to replicate them sounds like a headache you don't need to bring on yourself (& future SRC maintainers). my 2c david > Up to now, the tests have been running with whitespace stripped out. > Newlines and tabs are insignificant in HTML, so I figured why bother > with them? > > Now I realize why: they're significant in pre tags and they also make > your code look pretty! > > I've been working to get SRC output to roughly match Tetxile2's as > far as tabs and newlines go. It's tough and is adding a lot of > messiness to the code! I'm close to done, but I'm not satisfied with > the result. > > How about if we just ran the output through Tidy? Could we bundle > the tidylib c files in so the user doesn't have to have tidylib > installed separately? Will the license allow it? > > What do you all think? > > Jason > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > > From gaspard at teti.ch Fri Mar 14 13:26:56 2008 From: gaspard at teti.ch (Gaspard Bucher) Date: Fri, 14 Mar 2008 18:26:56 +0100 Subject: Whitespace in SuperRedCloth In-Reply-To: <47D9FFE8.9060804@whatcould.com> References: <6B7195FF-2F6F-412E-8EFA-844FC53A1FB3@jasongarber.com> <47D9FFE8.9060804@whatcould.com> Message-ID: <7a9f744a0803141026y5e3d86fduff02a2218baa5c26@mail.gmail.com> I agree. Whitespace is not crucial. As a rule of thumb I would say "never add or remove anything". This means that if the user inserted a return, leave it in the source (either before the

    or after for example). If there is a tab, leave it. If there is no tab, no return, then do not add anything. Let a whitespace be like any other character. This rule means: 1. the parsing does not need fancy coding techniques. 2. the code will be sufficiently readable. 3. there is no messing up in "pre" tags. This would imply removing the added whitespaces in the ruby HTML rules and keep '\n' and ' ' in the ragel regex. (space => cat, ensure CRLF is captured in blocks). Gaspard 2008/3/14, David Reese : > Running everything through tidy seems superfluous to me -- if i had to > vote, i'd say formatting the html all prettylike isn't that important, > and isn't worth the added parsing time (and trying to get the right libs > for the platform in the gem, etc). developers can call tidy in their > own projects if they really want tidy html, right? > > is there a way you could: > > # retain whitespace between pre/code tags -- you'd want to do that even > with tidy, since it won't always know how you want to format your code -- > # and then do something simple with the HTML, like adding newlines after > the end of closed block elments (

    \n or \n\n)? maybe tabs > before
  • elements or something, but not getting too fancy. > > I'm not sure they spent too much time in Textile2 trying to get the tabs > the way they are -- trying to replicate them sounds like a headache you > don't need to bring on yourself (& future SRC maintainers). > > my 2c > > david > > > > Up to now, the tests have been running with whitespace stripped out. > > Newlines and tabs are insignificant in HTML, so I figured why bother > > with them? > > > > Now I realize why: they're significant in pre tags and they also make > > your code look pretty! > > > > I've been working to get SRC output to roughly match Tetxile2's as > > far as tabs and newlines go. It's tough and is adding a lot of > > messiness to the code! I'm close to done, but I'm not satisfied with > > the result. > > > > How about if we just ran the output through Tidy? Could we bundle > > the tidylib c files in so the user doesn't have to have tidylib > > installed separately? Will the license allow it? > > > > What do you all think? > > > > Jason > > _______________________________________________ > > Redcloth-upwards mailing list > > Redcloth-upwards at rubyforge.org > > http://rubyforge.org/mailman/listinfo/redcloth-upwards > > > > > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > From jg at jasongarber.com Fri Mar 14 15:20:16 2008 From: jg at jasongarber.com (Jason Garber) Date: Fri, 14 Mar 2008 15:20:16 -0400 Subject: Whitespace in SuperRedCloth In-Reply-To: <47D9FFE8.9060804@whatcould.com> References: <6B7195FF-2F6F-412E-8EFA-844FC53A1FB3@jasongarber.com> <47D9FFE8.9060804@whatcould.com> Message-ID: <61D9886D-2D4A-4D89-A8B4-98173F44232F@jasongarber.com> Yes, you're very right. I've been just making it decent but not overly precise and it's going very well. I'll be able to commit my changes soon. Thanks for the feedback, David and Gaspard! On Mar 14, 2008, at 12:32 AM, David Reese wrote: > Running everything through tidy seems superfluous to me -- if i had to > vote, i'd say formatting the html all prettylike isn't that important, > and isn't worth the added parsing time (and trying to get the right > libs > for the platform in the gem, etc). developers can call tidy in their > own projects if they really want tidy html, right? > > is there a way you could: > > # retain whitespace between pre/code tags -- you'd want to do that > even > with tidy, since it won't always know how you want to format your > code -- > # and then do something simple with the HTML, like adding newlines > after > the end of closed block elments (

    \n or \n\n)? maybe tabs > before
  • elements or something, but not getting too fancy. > > I'm not sure they spent too much time in Textile2 trying to get the > tabs > the way they are -- trying to replicate them sounds like a headache > you > don't need to bring on yourself (& future SRC maintainers). > > my 2c > david > >> Up to now, the tests have been running with whitespace stripped out. >> Newlines and tabs are insignificant in HTML, so I figured why bother >> with them? >> >> Now I realize why: they're significant in pre tags and they also make >> your code look pretty! >> >> I've been working to get SRC output to roughly match Tetxile2's as >> far as tabs and newlines go. It's tough and is adding a lot of >> messiness to the code! I'm close to done, but I'm not satisfied with >> the result. >> >> How about if we just ran the output through Tidy? Could we bundle >> the tidylib c files in so the user doesn't have to have tidylib >> installed separately? Will the license allow it? >> >> What do you all think? >> >> Jason >> _______________________________________________ >> Redcloth-upwards mailing list >> Redcloth-upwards at rubyforge.org >> http://rubyforge.org/mailman/listinfo/redcloth-upwards >> >> > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards From jg at jasongarber.com Sat Mar 15 08:53:51 2008 From: jg at jasongarber.com (Jason Garber) Date: Sat, 15 Mar 2008 08:53:51 -0400 Subject: Now what? Message-ID: > $ rake test > /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/ > rake-0.7.3/lib/rake/rake_test_loader.rb" "test/test_formatters.rb" > "test/test_parser.rb" > Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/ > rake_test_loader > Started > ...................................................................... > ...................................................................... > ...................................................................... > ...................................................................... > ...................................................................... > .......................................... > Finished in 2.259052 seconds. > > 392 tests, 392 assertions, 0 failures, 0 errors From why at hobix.com Sun Mar 16 19:08:17 2008 From: why at hobix.com (why the lucky stiff) Date: Sun, 16 Mar 2008 17:08:17 -0600 Subject: Now what? In-Reply-To: References: Message-ID: <20080316230817.GG47128@beekeeper.hobix.com> On Sat, Mar 15, 2008 at 08:53:51AM -0400, Jason Garber wrote: > > 392 tests, 392 assertions, 0 failures, 0 errors Oh wow splendid! Well done, Jason. Crazy great work. What Ruby version and Ragel version are you using? I'm getting a bunch of failed tests with: NoMethodError: private method `gsub' called for nil:NilClass ./test/../lib/superredcloth/html.rb:141:in `link' Once I can get this working, I'll put up some release gems and we can get this out to people. Seriously, way to go! _why From curtis.schofield at gmail.com Sun Mar 16 19:27:14 2008 From: curtis.schofield at gmail.com (^_^) Date: Sun, 16 Mar 2008 16:27:14 -0700 Subject: Now what? In-Reply-To: References: Message-ID: <582BE8F3-7165-47F7-8D49-2D6E4D042DEC@noself.net> sweet. i seem to remember there were 8 passing >> $ rake test >> /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/ >> rake-0.7.3/lib/rake/rake_test_loader.rb" "test/test_formatters.rb" >> "test/test_parser.rb" >> Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/ >> rake_test_loader >> Started >> ...................................................................... >> ...................................................................... >> ...................................................................... >> ...................................................................... >> ...................................................................... >> .......................................... >> Finished in 2.259052 seconds. >> >> 392 tests, 392 assertions, 0 failures, 0 errors > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/redcloth-upwards/attachments/20080316/8ea115b6/attachment.html From johan at johansorensen.com Mon Mar 17 05:07:11 2008 From: johan at johansorensen.com (=?ISO-8859-1?Q?Johan_S=F8rensen?=) Date: Mon, 17 Mar 2008 10:07:11 +0100 Subject: Now what? In-Reply-To: References: Message-ID: <9e0f31700803170207r253a16e3rd91e7fd9a1bcfd45@mail.gmail.com> On Sat, Mar 15, 2008 at 1:53 PM, Jason Garber wrote: > > 392 tests, 392 assertions, 0 failures, 0 errors !!! Awesome work Jason, kudos! This still requires the Ragel trunk to generate the c files? JS From jg at jasongarber.com Mon Mar 17 12:26:14 2008 From: jg at jasongarber.com (Jason Garber) Date: Mon, 17 Mar 2008 12:26:14 -0400 Subject: Now what? In-Reply-To: <20080316230817.GG47128@beekeeper.hobix.com> References: <20080316230817.GG47128@beekeeper.hobix.com> Message-ID: Yes, t requires Ragel trunk. I had to use a leaving action at the end of a scanner pattern in a few cases, and that's only supported in Ragel 6.1, which hasn't been released yet. Wish it didn't have to be that way, but it did. I've asked Adrian when we can expect 6.1. Let's talk a bit about interface. I'm thinking we shouldn't break Rails... > require_library_or_gem "redcloth" unless Object.const_defined? > (:RedCloth) > > def textilize(text) > if text.blank? > "" > else > textilized = RedCloth.new(text, [ :hard_breaks ]) > textilized.hard_breaks = true if textilized.respond_to? > ("hard_breaks=") > textilized.to_html > end > end so maybe we need a dummy second parameter to RedCloth.new? Ugh. We had talked earlier about releasing this as RedCloth 4.0. I'm all for that, but how shall we go about warning people that it's a major change? We've got some people using RedCloth 3.0.4 with hard breaks off, some people with it on and broken, some with it on and hacked to work. Maybe we should emit a warning if the second parameter isn't passed [:hard_breaks] or #hard_breaks= isn't set to true? At least people using Rails' #textilize would never see it (thankfully, Rails always had :hard_breaks on). Should we switch the class name to RedCloth now? Should we copy the branch to trunk? Jason On Mar 16, 2008, at 7:08 PM, why the lucky stiff wrote: > On Sat, Mar 15, 2008 at 08:53:51AM -0400, Jason Garber wrote: >>> 392 tests, 392 assertions, 0 failures, 0 errors > > Oh wow splendid! Well done, Jason. Crazy great work. > > What Ruby version and Ragel version are you using? I'm getting a > bunch of failed tests with: > > NoMethodError: private method `gsub' called for nil:NilClass > ./test/../lib/superredcloth/html.rb:141:in `link' > > Once I can get this working, I'll put up some release gems and > we can get this out to people. Seriously, way to go! > > _why > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/redcloth-upwards/attachments/20080317/e42c6173/attachment.html From why at hobix.com Mon Mar 17 14:20:52 2008 From: why at hobix.com (why the lucky stiff) Date: Mon, 17 Mar 2008 12:20:52 -0600 Subject: Now what? In-Reply-To: References: <20080316230817.GG47128@beekeeper.hobix.com> Message-ID: <20080317182051.GH47128@beekeeper.hobix.com> On Mon, Mar 17, 2008 at 12:26:14PM -0400, Jason Garber wrote: > Yes, t requires Ragel trunk. Perfeck, that did it. > Let's talk a bit about interface. I'm thinking we shouldn't break Rails... > > so maybe we need a dummy second parameter to RedCloth.new? Ugh. Oh, that sounds good. I doubt anyone is using hard breaks off any more. Maybe we get RedCloth 4 out and then whoever's got problems will come out in the open and I think it'll be clear what to do. > We had talked earlier about releasing this as RedCloth 4.0. I'm all for > that, but how shall we go about warning people that it's a major change? Well, we could release it as a gem with the lowercase `redcloth` name. Then no one will auto-upgrade. And perhaps there is a way to throw a warning in extconf.rb that will require that RedCloth 3 be uninstalled. Either that or we could just pre-release on my gem server and just put out 4.0 once we feel good enough about the upgrade. Whatever you like, really. > Should we switch the class name to RedCloth now? Should we copy the branch > to trunk? Just finished that. Seriously, this is tremendous, Jason!! _why From tony.mzungu at gmail.com Mon Mar 17 14:28:50 2008 From: tony.mzungu at gmail.com (Tony White) Date: Mon, 17 Mar 2008 21:28:50 +0300 Subject: Now what? In-Reply-To: <20080317182051.GH47128@beekeeper.hobix.com> References: <20080316230817.GG47128@beekeeper.hobix.com> <20080317182051.GH47128@beekeeper.hobix.com> Message-ID: <5db6eccd0803171128y243ea30q3ee4c27ddbe22714@mail.gmail.com> Congrats Jason - great work!!! Just one thing.... can we change the thread title - all I can think of are boghogs! ;) Tony On 17/03/2008, why the lucky stiff wrote: > On Mon, Mar 17, 2008 at 12:26:14PM -0400, Jason Garber wrote: > > Yes, t requires Ragel trunk. > > > Perfeck, that did it. > > > > Let's talk a bit about interface. I'm thinking we shouldn't break Rails... > > > > > so maybe we need a dummy second parameter to RedCloth.new? Ugh. > > > Oh, that sounds good. I doubt anyone is using hard breaks off any > more. Maybe we get RedCloth 4 out and then whoever's got problems > will come out in the open and I think it'll be clear what to do. > > > > We had talked earlier about releasing this as RedCloth 4.0. I'm all for > > that, but how shall we go about warning people that it's a major change? > > > Well, we could release it as a gem with the lowercase `redcloth` > name. Then no one will auto-upgrade. And perhaps there is a way to > throw a warning in extconf.rb that will require that RedCloth 3 be > uninstalled. > > Either that or we could just pre-release on my gem server and just > put out 4.0 once we feel good enough about the upgrade. Whatever > you like, really. > > > > Should we switch the class name to RedCloth now? Should we copy the branch > > to trunk? > > > Just finished that. Seriously, this is tremendous, Jason!! > > > _why > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > From why at hobix.com Mon Mar 17 15:21:32 2008 From: why at hobix.com (why the lucky stiff) Date: Mon, 17 Mar 2008 13:21:32 -0600 Subject: + redcloth 3.274 gems (win32 and src) Message-ID: <20080317192132.GA82848@beekeeper.hobix.com> Okay, you can get some gems of the latest: gem install RedCloth --source http://code.whytheluckystiff.net Don't take these as a decision on how Jason should name or package the RedCloth 4 gem, this is just to get the code into everyone's hands for testing. _why From gaspard at teti.ch Tue Mar 18 08:20:58 2008 From: gaspard at teti.ch (Gaspard Bucher) Date: Tue, 18 Mar 2008 13:20:58 +0100 Subject: Now what? In-Reply-To: <9e0f31700803170207r253a16e3rd91e7fd9a1bcfd45@mail.gmail.com> References: <9e0f31700803170207r253a16e3rd91e7fd9a1bcfd45@mail.gmail.com> Message-ID: <7a9f744a0803180520t58ba813fjd037cd63f39fcd70@mail.gmail.com> I also feel concerned about the ragel dependency. Please include generated C files to avoid every redcloth user to install/compile ragel. The upgrade path for 3.x users should be as smooth as possible, but if we cannot avoid some glitches, people upgrading there gems are usually warned that they will have to do some small changes to their apps. 2008/3/17, Johan S?rensen : > On Sat, Mar 15, 2008 at 1:53 PM, Jason Garber wrote: > > > 392 tests, 392 assertions, 0 failures, 0 errors > > > !!! > > Awesome work Jason, kudos! > > This still requires the Ragel trunk to generate the c files? > > > JS > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > From jg at jasongarber.com Tue Mar 18 14:00:46 2008 From: jg at jasongarber.com (Jason Garber) Date: Tue, 18 Mar 2008 14:00:46 -0400 Subject: Now what? In-Reply-To: <7a9f744a0803180520t58ba813fjd037cd63f39fcd70@mail.gmail.com> References: <9e0f31700803170207r253a16e3rd91e7fd9a1bcfd45@mail.gmail.com> <7a9f744a0803180520t58ba813fjd037cd63f39fcd70@mail.gmail.com> Message-ID: With the gem, Ragel is not required. Just gem install RedCloth --source http://code.whytheluckystiff.net and you're done. On Mar 18, 2008, at 8:20 AM, Gaspard Bucher wrote: > I also feel concerned about the ragel dependency. Please include > generated C files to avoid every redcloth user to install/compile > ragel. > > The upgrade path for 3.x users should be as smooth as possible, but if > we cannot avoid some glitches, people upgrading there gems are usually > warned that they will have to do some small changes to their apps. > > 2008/3/17, Johan S?rensen : >> On Sat, Mar 15, 2008 at 1:53 PM, Jason Garber >> wrote: >>>> 392 tests, 392 assertions, 0 failures, 0 errors >> >> >> !!! >> >> Awesome work Jason, kudos! >> >> This still requires the Ragel trunk to generate the c files? >> >> >> JS >> >> _______________________________________________ >> Redcloth-upwards mailing list >> Redcloth-upwards at rubyforge.org >> http://rubyforge.org/mailman/listinfo/redcloth-upwards >> > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards From stephen.bannasch at deanbrook.org Sun Mar 23 04:55:04 2008 From: stephen.bannasch at deanbrook.org (Stephen Bannasch) Date: Sun, 23 Mar 2008 04:55:04 -0400 Subject: redcloth gem ragel code doesn't build in jruby Message-ID: I tried to install RedCloth-3.274 in jruby (trunk) but the install failed when RedCloth tried to build the C code using mkmf: I forget whether SuperRedcloth ever did build in JRuby?? I know Hpricot (which also uses ragel which can compile to Java code) works in JRuby -- with the patch here: https://code.whytheluckystiff.net/hpricot/ticket/131) I might be confusing the two ... FYI: If you are on a Mac or Linux system the script I pasted here is a very easy way to get a trunk JRuby install with it's own gems that won't interfere with any other Ruby you have installed: http://pastie.caboo.se/165048 More info here: http://wiki.jruby.org/wiki/Getting_Started **************************************************************************** Here's what happens during the install: jruby -S gem install RedCloth --source http://code.whytheluckystiff.net Updating metadata for 157 gems from http://code.whytheluckystiff.net ............................................................................................................................................................. complete Building native extensions. This could take a while... extconf.rb:1:in `require': no such file to load -- mkmf (LoadError) from extconf.rb:1 ERROR: Error installing RedCloth: ERROR: Failed to build gem native extension. /Users/stephen/dev/jruby_trunk/jruby/bin/jruby extconf.rb install RedCloth --source http://code.whytheluckystiff.net Gem files will remain installed in /Users/stephen/dev/jruby_trunk/jruby/lib/ruby/gems/1.8/gems/RedCloth-3.274 for inspection. Results logged to /Users/stephen/dev/jruby_trunk/jruby/lib/ruby/gems/1.8/gems/RedCloth-3.274/ext/redcloth_scan/gem_make.out **************************************************************************** FYI: If you are on a Mac or Linux system the script I pasted here is a very easy way to get a trunk JRuby install with it's own gems that won't interfere with any other Ruby you have installed: http://pastie.caboo.se/165048 More info here: http://wiki.jruby.org/wiki/Getting_Started From stephen.bannasch at deanbrook.org Sun Mar 23 11:43:12 2008 From: stephen.bannasch at deanbrook.org (Stephen Bannasch) Date: Sun, 23 Mar 2008 11:43:12 -0400 Subject: [pathch] new failing test in trunk/test/code.yml Message-ID: I've been playing with RedCloth-3.274 (great work Jason!) and found a problem with processing of code content. This: Regex-based string substitution with Ruby\'s gsub!: @"123<789".gsub!(/ "123789"@ Should produce:

    Regex-based string substitution with Ruby’s gsub!: 123<789".gsub!(/</, "") => "123789"

    But instead produces:

    Regex-based string substitution with Ruby’s gsub!: 3<789".gsub!(/</, "") => "123789"

    The "12" after the first double quote character in the code section are eaten. I've got a question on the ragel-users list about how to compile trunk ragel -- it seems to require ragel already installed to build itself -- when I get that working I might be able to look into the problem. In the meantime here's a patch with a test that should fail. Index: trunk/test/code.yml =================================================================== --- trunk/test/code.yml (revision 284) +++ trunk/test/code.yml (working copy) @@ -7,6 +7,10 @@ in: 'Please type @cat "file.txt" > otherfile.txt@ at the prompt.' html: '

    Please type cat "file.txt" > otherfile.txt at the prompt.

    ' --- +name: more inlne code escapement +in: 'Regex-based string substitution with Ruby\'s gsub!: @"123<789".gsub!(/ "123789"@' +html: '

    Regex-based string substitution with Ruby’s gsub!: 123<789".gsub!(/</, "") => "123789"

    ' +--- name: escaping in blockcode in: 'bc. This is within a block of code, so < and > should be entities. You can talk about a

    tag if you wish and it will be properly escaped.' html: '

    This is within a block of code, so < and > 
    should be entities.  You can talk about a <p class="foo"> tag 
    if you wish and it will be properly escaped.
    ' From stephen.bannasch at deanbrook.org Sun Mar 23 12:10:07 2008 From: stephen.bannasch at deanbrook.org (Stephen Bannasch) Date: Sun, 23 Mar 2008 12:10:07 -0400 Subject: [patch] more failing tests in trunk/test/code.yml Message-ID: Found another problem: This: This paragraph is aligned left but if you add this: %{color:blue}@p>.@% to the beginning it will be aligned right. Should produce:

    This paragraph is aligned left but if you add this: p>. to the beginning it will be aligned right.

    But instead produces:

    This paragraph is aligned left but if you add this: p>. to the beginning it will be aligned right.

    I feel a little bad just sending list messages about problems but of course the reason I am is because I was inspired to use RedCloth because of all the great work you've done! There are now two added tests in the patch below (also attached): Index: trunk/test/code.yml =================================================================== --- trunk/test/code.yml (revision 284) +++ trunk/test/code.yml (working copy) @@ -7,6 +7,15 @@ in: 'Please type @cat "file.txt" > otherfile.txt@ at the prompt.' html: '

    Please type cat "file.txt" > otherfile.txt at the prompt.

    ' --- +name: more inlne code escapement +in: 'Regex-based string substitution with Ruby\'s gsub!: @"123<789".gsub!(/ "123789"@' +html: '

    Regex-based string substitution with Ruby’s gsub!: 123<789".gsub!(/</, "") => "123789"

    ' +--- +name: inlne code escapement describing textile paragraph styling +in: 'This paragraph is aligned left but if you add this: %{color:blue}@p>.@% to the beginning it will be aligned right.' +html: '

    This paragraph is aligned left but if you add this: p>. to the beginning it will be aligned right.

    ' +or:blue;">p>. to the beginning it will be aligned right.

    +--- name: escaping in blockcode in: 'bc. This is within a block of code, so < and > should be entities. You can talk about a

    tag if you wish and it will be properly escaped.' html: '

    This is within a block of code, so < and > 
    should be entities.  You can talk about a <p class="foo"> tag 
    if you wish and it will be properly escaped.
    ' -------------- next part -------------- A non-text attachment was scrubbed... Name: two_new_test_for_code_redcloth_r284.diff Type: application/octet-stream Size: 1444 bytes Desc: not available Url : http://rubyforge.org/pipermail/redcloth-upwards/attachments/20080323/aef26f43/attachment.obj From stephen.bannasch at deanbrook.org Sun Mar 23 16:39:06 2008 From: stephen.bannasch at deanbrook.org (Stephen Bannasch) Date: Sun, 23 Mar 2008 16:39:06 -0400 Subject: created tickets 44 and 45 for last two problems Message-ID: I got trunk ragel to compile and was able to find some errors in my tests. I've created two tickets for the two problems with code blocks and attached a patch with the updated two tests to Ticket-45. https://code.whytheluckystiff.net/redcloth/ticket/44 https://code.whytheluckystiff.net/redcloth/ticket/45 FYI: Ragel compilation steps on MacOS 10.5.2 with MacPorts installed: # get v6.0 of ragel installed -- needed to build trunk ragel sudo port install ragel # also install prerequisite gperf sudo port install gperf # download and install prerequisite kelbt wget http://www.cs.queensu.ca/~thurston/kelbt/kelbt-0.12.tar.gz tar xvzf kelbt-0.12.tar.gz cd kelbt-0.12 ./configure make sudo make install cd .. # Checkout trunk ragel and install in a directory # in my home folder -- NOT in /usr/local. # The reason is to not interfere with the ports system. # When GCC compiles code it doesn't appear possible # to tell it not to look in /usr/local/lib for libraries. # So in general I've taken to putting code I compile # from source that either: # 1) creates libraries # 2) creates binarys that are also made by ports # in ~/dev/local svn co svn://mambo.cs.queensu.ca/ragel/trunk ragel cd ragel ./configure --prefix ~/dev/local make make install # add ~/dev/local/bin to PATH before /opt/local/bin From jg at jasongarber.com Mon Mar 24 09:22:43 2008 From: jg at jasongarber.com (Jason Garber) Date: Mon, 24 Mar 2008 09:22:43 -0400 Subject: redcloth gem ragel code doesn't build in jruby In-Reply-To: References: Message-ID: <629B61AE-650C-4AC0-9FF6-BF28C3F665B2@jasongarber.com> Stephen: I'm guessing you figured out that Hpricot has JRuby source and not RedCloth. You're welcome to code it, though! Good work on benchmarking the code generation styles. I'm eager to see the results! Jason On Mar 23, 2008, at 4:55 AM, Stephen Bannasch wrote: > I tried to install RedCloth-3.274 in jruby (trunk) but the install > failed when RedCloth tried to build the C code using mkmf: > > I forget whether SuperRedcloth ever did build in JRuby?? > > I know Hpricot (which also uses ragel which can compile to Java code) > works in JRuby -- with the patch here: > > https://code.whytheluckystiff.net/hpricot/ticket/131) > > I might be confusing the two ... > > FYI: If you are on a Mac or Linux system the script I pasted here is > a very easy way to get a trunk JRuby install with it's own gems that > won't interfere with any other Ruby you have installed: > > http://pastie.caboo.se/165048 > > More info here: > > http://wiki.jruby.org/wiki/Getting_Started > > ********************************************************************** > ****** > > Here's what happens during the install: > > jruby -S gem install RedCloth --source http:// > code.whytheluckystiff.net > Updating metadata for 157 gems from http://code.whytheluckystiff.net > ...................................................................... > ...................................................................... > ................. > complete > Building native extensions. This could take a while... > extconf.rb:1:in `require': no such file to load -- mkmf (LoadError) > from extconf.rb:1 > ERROR: Error installing RedCloth: > ERROR: Failed to build gem native extension. > > /Users/stephen/dev/jruby_trunk/jruby/bin/jruby extconf.rb install > RedCloth --source http://code.whytheluckystiff.net > > > Gem files will remain installed in > /Users/stephen/dev/jruby_trunk/jruby/lib/ruby/gems/1.8/gems/ > RedCloth-3.274 > for inspection. > Results logged to > /Users/stephen/dev/jruby_trunk/jruby/lib/ruby/gems/1.8/gems/ > RedCloth-3.274/ext/redcloth_scan/gem_make.out > > ********************************************************************** > ****** > > FYI: If you are on a Mac or Linux system the script I pasted here is > a very easy way to get a trunk JRuby install with it's own gems that > won't interfere with any other Ruby you have installed: > > http://pastie.caboo.se/165048 > > More info here: > > http://wiki.jruby.org/wiki/Getting_Started > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards