You need to set the source-highlighter attribute to pygments and you need to do this in the asciidoc command-line or the document header (not the document body because the .conf file conditional macros are processed at load time). This works for me:

8<---------------
= Title
:source-highlighter: pygments

[source, obj-c]
if n < 0: print 'Hello World!'
NSLog(@"hello world");

[source, objc]
if n < 0: print 'Hello World!'
NSLog(@"hello world");

[source, objective-c]
if n < 0: print 'Hello World!'
NSLog(@"hello world");

[source, objectivec]
[true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    puts "#{a.inspect} => #{b.inspect}"
NSLog(@"hello world");
8<------------------

I also found a bug: the pygments source is plain and not highlighted because the pygments.css was not picked up by new 'source-highlighter' attribute. Fixed:

https://code.google.com/p/asciidoc/source/detail?r=a0d947726a4b6e2b14f49d4e7a6673dc58451514


Cheers, Stuart


On 30/03/12 04:07, C4 - Travis wrote:
Sorry, forgot to post the actual warning:

WARNING: source-highlight-filter-objc.txt: line 139: no output from filter:
source-highlight -f xhtml -s objectivec
WARNING: source-highlight-filter-objc.txt: line 139: no output from filter:
source-highlight -f xhtml -s objective-c
WARNING: source-highlight-filter-objc.txt: line 139: no output from filter:
source-highlight -f xhtml -s objc
WARNING: source-highlight-filter-objc.txt: line 139: no output from filter:
source-highlight -f xhtml -s obj-c

These are 4 different warnings which come from testing [source, objc], [source,
obj-c], [source, objective-c], [source objectivec] on different lines of text:

Which comes from this:
Render this highlighted source code:

[source, obj-c]
if n < 0: print 'Hello World!'
NSLog(@"hello world");

[source, objc]
if n < 0: print 'Hello World!'
NSLog(@"hello world");

[source, objective-c]
if n < 0: print 'Hello World!'
NSLog(@"hello world");

[source, objectivec]
[true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
puts "#{a.inspect} => #{b.inspect}"
NSLog(@"hello world");

--
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/-/t7X9R0WxdG0J.
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