diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2024-03-07 18:39:31 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2024-03-07 18:39:31 -0700 |
| commit | b095a23c4a63a1a8b7fe23149fc4fbf3b2814fe0 (patch) | |
| tree | 95bc1fcfb181e1adde44f2b62cc0be279297fb4c | |
| parent | d3b48e28973ccec40dac8e84d382fa25aa4c2521 (diff) | |
avoid leaky language variable when processing source block
| -rw-r--r-- | lib/asciidoctor/parser.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asciidoctor/parser.rb b/lib/asciidoctor/parser.rb index bd1abad1..c8b6f86b 100644 --- a/lib/asciidoctor/parser.rb +++ b/lib/asciidoctor/parser.rb @@ -819,7 +819,7 @@ class Parser unless block case block_context when :listing, :source - if block_context == :source || (!attributes[1] && (language = attributes[2] || doc_attrs['source-language'])) + if block_context == :source || (language = attributes[1] ? nil : language = attributes[2] || doc_attrs['source-language']) if language attributes['style'] = 'source' attributes['language'] = language |
