Hello All, first post to the list. I just checked out trunk and it broke my tests. Turns out that the BREAK_RE regex found in base.rb is missing the "/m" mode modifier. I am still getting my head around the library so i may be missing something but was that done on purpose? Thanks. jeremy Index: base.rb ==================================================================--- base.rb (revision 24) +++ base.rb (working copy) @@ -181,7 +181,7 @@ @@? (.*?)/x BLOCKS_GROUP_RE = /\n{2,}(?! )/m - BLOCK_RE = /^(([a-z]+)(\d*))(#{A}#{C})\.(?::(\S+))? (.*)$/ + BLOCK_RE = /^(([a-z]+)(\d*))(#{A}#{C})\.(?::(\S+))? (.*)$/m SETEXT_RE = /\A(.+?)\n([=-])[=-]* *$/m ATX_RE = /\A(\#{1,6}) # $1 = string of #''s [ ]*
Can you provide the tests that didn''t work without the "/m"? -Lucas http://rufy.com/ On Jun 5, 2006, at 4:09 PM, Jeremy Burks wrote:> Hello All, first post to the list. > > I just checked out trunk and it broke my tests. > > Turns out that the BREAK_RE regex found in base.rb is missing the "/m" > mode modifier. > > I am still getting my head around the library so i may be missing > something but was that done on purpose? > > Thanks. > jeremy > > > Index: base.rb > ==================================================================> --- base.rb (revision 24) > +++ base.rb (working copy) > @@ -181,7 +181,7 @@ > @@? > (.*?)/x > BLOCKS_GROUP_RE = /\n{2,}(?! )/m > - BLOCK_RE = /^(([a-z]+)(\d*))(#{A}#{C})\.(?::(\S+))? (.*)$/ > + BLOCK_RE = /^(([a-z]+)(\d*))(#{A}#{C})\.(?::(\S+))? (.*)$/m > SETEXT_RE = /\A(.+?)\n([=-])[=-]* *$/m > ATX_RE = /\A(\#{1,6}) # $1 = string of #''s > [ ]* > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards
i have attached my test case. i am extending redcloth to handle syntax highlighting via the syntax library. it could very well be i am miss using "block_textile_prefix". here is what i am going for: code[ruby]. # a code block class Foo < Bar def to_s "Foo Bar!" end end On 6/5/06, Lucas Carlson <cardmagic at gmail.com> wrote:> Can you provide the tests that didn''t work without the "/m"? > > -Lucas > http://rufy.com/ > > > > On Jun 5, 2006, at 4:09 PM, Jeremy Burks wrote: > > > Hello All, first post to the list. > > > > I just checked out trunk and it broke my tests. > > > > Turns out that the BREAK_RE regex found in base.rb is missing the "/m" > > mode modifier. > > > > I am still getting my head around the library so i may be missing > > something but was that done on purpose? > > > > Thanks. > > jeremy > > > > > > Index: base.rb > > ==================================================================> > --- base.rb (revision 24) > > +++ base.rb (working copy) > > @@ -181,7 +181,7 @@ > > @@? > > (.*?)/x > > BLOCKS_GROUP_RE = /\n{2,}(?! )/m > > - BLOCK_RE = /^(([a-z]+)(\d*))(#{A}#{C})\.(?::(\S+))? (.*)$/ > > + BLOCK_RE = /^(([a-z]+)(\d*))(#{A}#{C})\.(?::(\S+))? (.*)$/m > > SETEXT_RE = /\A(.+?)\n([=-])[=-]* *$/m > > ATX_RE = /\A(\#{1,6}) # $1 = string of #''s > > [ ]* > > _______________________________________________ > > 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 >-------------- next part -------------- A non-text attachment was scrubbed... Name: marooncloth_test.rb Type: application/x-ruby Size: 2406 bytes Desc: not available Url : http://rubyforge.org/pipermail/redcloth-upwards/attachments/20060605/fa0d5ba0/attachment.bin
it just occured from me. i wrote my tests initially against the redcloth version found in the alexey branch of i2 (http://dev.rubyonrails.org/browser/tools/i2/branches/alexey/lib/redcloth.rb). that must have been customized and i made the bad assumption that was how BREAK_RE was in redcloth 3.0.3. On 6/5/06, Jeremy Burks <jeremy.burks at gmail.com> wrote:> i have attached my test case. > > i am extending redcloth to handle syntax highlighting via the syntax > library. it could very well be i am miss using "block_textile_prefix". > > here is what i am going for: > > code[ruby]. # a code block > class Foo < Bar > def to_s > "Foo Bar!" > end > end > > > > On 6/5/06, Lucas Carlson <cardmagic at gmail.com> wrote: > > Can you provide the tests that didn''t work without the "/m"? > > > > -Lucas > > http://rufy.com/ > > > > > > > > On Jun 5, 2006, at 4:09 PM, Jeremy Burks wrote: > > > > > Hello All, first post to the list. > > > > > > I just checked out trunk and it broke my tests. > > > > > > Turns out that the BREAK_RE regex found in base.rb is missing the "/m" > > > mode modifier. > > > > > > I am still getting my head around the library so i may be missing > > > something but was that done on purpose? > > > > > > Thanks. > > > jeremy > > > > > > > > > Index: base.rb > > > ==================================================================> > > --- base.rb (revision 24) > > > +++ base.rb (working copy) > > > @@ -181,7 +181,7 @@ > > > @@? > > > (.*?)/x > > > BLOCKS_GROUP_RE = /\n{2,}(?! )/m > > > - BLOCK_RE = /^(([a-z]+)(\d*))(#{A}#{C})\.(?::(\S+))? (.*)$/ > > > + BLOCK_RE = /^(([a-z]+)(\d*))(#{A}#{C})\.(?::(\S+))? (.*)$/m > > > SETEXT_RE = /\A(.+?)\n([=-])[=-]* *$/m > > > ATX_RE = /\A(\#{1,6}) # $1 = string of #''s > > > [ ]* > > > _______________________________________________ > > > 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 > > > > >