On 28 November 2012 19:28, Jens Getreu <[email protected]> wrote:
> Hi Lex,
>
> unfortunately my solution breaks the simple case, when there is no argument.

oops :)

>
> As I understood src_numbered@numbered: should also treat the undefined case.

No, it explicitly says the line is dropped if undefined (see
http://www.methods.co.nz/asciidoc/userguide.html#_conditional_attribute_references
).


> For me it doesn't. It breaks the following:
>
> ["source","java"]
> ----
> include::./Main-extrait.java[]
> ----
>
> Apparently these operators =?!#%@$ can not be nested either. Can they?

I guess you mean the conditional attributes? Only simple attribute
references can occur within the value of a conditional attribute
reference, so thats correct they don't nest.


> I no nothing about phyton. Can you help?

Do you mean Python? The attribute syntax is an Asciidoc thing, see the
reference above, so knowledge of Python isn't needed.

However looking at your patch again, first off it is against an old
version of source-highlight-filter.conf, not the current one as far as
I can tell.

But maybe a better way is not to try to use a positional attribute at
all when you don't want things numbered.  I guess you wanted to do
that so you could specify the tab size.  You can do that as a named
attribute and so not have to put something in the "numbered" position:

["source","java",src_tab="8",args="--line-range=4-"]
----
include::./Main-extrait.java[]
----

Cheers
Lex

>
>
> Ciao
>
>
> Jens
>
> Am Dienstag, 27. November 2012 22:18:49 UTC+1 schrieb Lex Trotman:
>>
>> On 28 November 2012 05:57, Jens Getreu <[email protected]> wrote:
>> > Consider the following asciidoc code:
>> >
>> > .Code source
>> > ["source","java","numbered","8",args="--line-range=1-4"]
>> > ----
>> > include::./Main-extrait.java[]
>> > ----
>> >
>> > ["source","java","unnumbered","8",args="--line-range=4-"]
>> > ----
>> > include::./Main-extrait.java[]
>> > ----
>> >
>> > The second listing with the unnumbered argument should be printed
>> > without line numbers. It is always printed with line numbers.
>> >
>> > Solution :
>> > replace all
>> >       src_numbered?
>> > with
>> >       src_numbered@numbered:
>> >
>> > in the following files:
>> >
>> >       /etc/asciidoc/filters/source/source-highlight-filter.conf
>>
>> Hi Jens,
>>
>> Looks ok, makes it match the documentation, just that your patch is
>> backasswards, it removes your change :)
>>
>> Cheers
>> Lex
>>
>>
>> >       /etc/asciidoc/backends/odt/odt.conf
>> >       /etc/asciidoc/backends/odp/odp.conf
>> >
>>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/asciidoc/-/GJ5HJ_0TNfgJ.
>
> 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.

Reply via email to