Thanks, Lex - not sure why I didn't find that before.  I am trying to lean
on the docs before turning to the group.

What's the best approach for using this updated filter, going forward?  I
could write a filter plugin and share it with my team, and it would override
the built-in filter with the same name, as per
http://www.methods.co.nz/asciidoc/userguide.html#X58 - seems like a great
short-to-medium-term solution.

Would something like this (starting and ending line numbers for source
filtering) be a likely candidate for inclusion into asciidoc proper, or am I
better off maintaining a filter plugin?  Are there contribution guidelines
(e.g. "include a testasciidoc exercise")?  Should I take the discussion to
http://code.google.com/p/asciidoc/issues/list ?

Thanks very much!

On Mon, Sep 5, 2011 at 8:46 PM, Lex Trotman <[email protected]> wrote:

> On 6 September 2011 01:05, Jason Morrison <[email protected]>
> wrote:
> > Thanks, Lex.  I worked a bit more on this today, and found that I just
> > wasn't using named attributes correctly.  Once I switched to specifying
> all
> > attributes, positionally, it worked great.  (Asciidoc 8.6.5 on OSX
> installed
> > via homebrew, btw)
> > Is there a way to use named attributes to specify only a subset of
> > attributes, rather than positional attributes?  E.g.:
> > [language=javascript,src_start=8,src_end=24]
>
>
> Hi,
>
> From the rules for attribute lists in
> http://www.methods.co.nz/asciidoc/userguide.html#X21
>
> "If the list contains any named or quoted attributes then all string
> attribute values must be quoted. "
>
> so
>
>  [language="javascript",src_start=8,src_end=24] or
> ["javascript",src_start=8,src_end=24]
>
> should work.
>
> Cheers
> Lex
>
>
> > rather than:
> > [javascript,unnumbered,2,8,24]
> > or
> > [javascript,,,8,24]
> > On Fri, Sep 2, 2011 at 7:00 PM, Lex Trotman <[email protected]> wrote:
> >>
> >> On 3 September 2011 04:45, Jason Morrison <[email protected]>
> >> wrote:
> >> > Hello,
> >> >
> >> > I'm using asciidoc to write an ebook on a programming topic, and often
> >> > include source code excerpts.  I'd like to maintain a working example
> >> > application in the repo, and include source code excerpts from the
> >> > actual example app into the book.
> >> >
> >> > But!  It'd be clumsy to include full source files every time.  I'd
> >> > like to say something like:
> >> >
> >> > [javascript,src_start=8,src_end=24]
> >> > source~~~~
> >> > include::task_detail_view.js[]
> >> > source~~~~
> >> >
> >> > I've read the documentation on filters and looked at a few example
> >> > filters' source to try to understand how they work.  I then tried to
> >> > implement this by passing the src_start,src_end attributes through to
> >> > either GNU source-highlight or sed (source-highlight is only used for
> >> > non-docbook backends; docbook does its own highlighting).  My attempt
> >> > source code is here:
> >> >
> >> > https://gist.github.com/1189434
> >> >
> >> > but it doesn't filter the source code.
> >> >
> >> > Can someone help point me in the right direction?  Thanks!
> >> > -Jason
> >> >
> >> What version of asciidoc?  What platform?
> >>
> >> Does the --verbose option show the right command is being run.
> >>
> >> Does that command work on the command line?
> >>
> >> Cheers
> >> Lex
> >>
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "asciidoc" 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/asciidoc?hl=en.
> >> >
> >> >
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "asciidoc" 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/asciidoc?hl=en.
> >>
> >
> >
> >
> > --
> > Jason Morrison
> > thoughtbot.com
> > 585-216-5657
> > @jayunit
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "asciidoc" 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/asciidoc?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" 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/asciidoc?hl=en.
>
>


-- 
Jason Morrison
thoughtbot.com
585-216-5657
@jayunit

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" 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/asciidoc?hl=en.

Reply via email to