diff --git a/lib/asciidoctor/parser.rb b/lib/asciidoctor/parser.rb index c6f5b1e99..400e154fd 100644 --- a/lib/asciidoctor/parser.rb +++ b/lib/asciidoctor/parser.rb @@ -818,7 +818,7 @@ def self.next_block(reader, parent, attributes = {}, options = {}) unless block case block_context when :listing, :source - if block_context == :source || (language = attributes[1] ? nil : language = attributes[2] || doc_attrs['source-language']) + if block_context == :source || (language = attributes[1] ? nil : attributes[2] || doc_attrs['source-language']) if language attributes['style'] = 'source' attributes['language'] = language