for anyone interested, Nathan has pulled this fix into nex3/haml

cheers.

On Apr 6, 3:25 pm, sbfaulkner <[email protected]> wrote:
> I've submitted a pull request for this commit...
>
> http://github.com/sbfaulkner/haml/commit/0c1ce22d4062c56347f6cc0e01af...
>
> I think it was this easy.
>
> Cheers.
>
> --Brent
>
> On Apr 6, 3:09 pm, Chris Eppstein <[email protected]> wrote:
>
>
>
> > Hi Brent,
> > I think this would be a great change and would benefit the :sass filter in
> > haml as well. The implementation should just be a simple matter of getting
> > that line number down passed down to the root node of the Sass AST via
> > render_to_tree in Engine#render.
>
> > Chris
>
> > On Mon, Apr 6, 2009 at 10:59 AM, sbfaulkner <[email protected]> wrote:
>
> > > I was working on getting backtraces to work nicely in sinatra when
> > > rendering templates and think I've run into a small bug in the
> > > handling of line numbers for Sass errors...
>
> > > The Haml::Engine supports :filename and :line options to specify where
> > > the "source" is coming from.
>
> > > The Sass::Engine appears to only partially support the same options.
>
> > > So, normally the following would report the error on line 5 of
> > > (sass)...
>
> > >  Sass::Engine.new(<<SASS).render
> > >  rule
> > >    :attr val
> > >    // comment!
>
> > >    :broken
> > >  SASS
>
> > > However, (I think) I should be able to...
>
> > >  Sass::Engine.new(<<SASS, :filename => __FILE__, :line => (__LINE__
> > > +1)).render
> > >  ...
>
> > > ... and the error should be reported in the current file (which works)
> > > at the appropriate line (which doesn't -- it's still 1-relative).
>
> > > The problem seems to be that the only place the :line option is ever
> > > referenced is in parse_script... is this an unimplemented feature?
>
> > > Any thoughts on how much work this will be to implement?
>
> > > At first glance, I might get away with simply adding options[:line]
> > > (minus 1) to index every time Line.new is done... ???
>
> > > Cheers.
>
> > > --Brent
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to