diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2017-07-17 23:57:40 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-17 23:57:40 -0600 |
| commit | e6083ac0b5dfa044efb73a37297024e883dc628c (patch) | |
| tree | e1ddc006438dd9475b071159eab080fbc389ef4d /lib | |
| parent | 3d5102902be594735bfae0c3e67a0acc33faa1fa (diff) | |
drop skipped content inside a delimited block (PR #2319)
- drop skipped content inside of creating empty paragraphs
- add missing test for scenario
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/parser.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/asciidoctor/parser.rb b/lib/asciidoctor/parser.rb index d1b9668d..7c96082a 100644 --- a/lib/asciidoctor/parser.rb +++ b/lib/asciidoctor/parser.rb @@ -444,13 +444,12 @@ class Parser if options.fetch :parse_metadata, true # read lines until there are no more metadata lines to read while parse_block_metadata_line reader, document, attributes, options + # discard the line just processed advanced = reader.advance + reader.skip_blank_lines end - if advanced && reader.empty? - # NOTE there are no cases when these attributes are used, but clear them anyway - attributes.clear - return - end + # QUESTION should we clear the attributes? no known cases when it's necessary + return if advanced && reader.empty? end if (extensions = document.extensions) |
