domgold / asciidoctor-gherkin-extension

Asciidoctor extension to format gherkin feature files in asciidoc files.
Apache License 2.0
14 stars 4 forks source link

Asciidoctor output becomes garbled with empty Background #3

Open jos-plas opened 5 years ago

jos-plas commented 5 years ago

Description

According to the https://cucumber.io/docs/gherkin/reference it is possible to have no text after the tag background. The example below is taken from the just mentioned website.

Feature: Multiple site support
  Only blog owners can post to a blog, except administrators,
  who can post to all blogs.

  Background:
    Given a global administrator named "Greg"
    And a blog named "Greg's anti-tax rants"
    And a customer named "Dr. Bill"
    And a blog named "Expensive Therapy" owned by "Dr. Bill"

Result asciidoctor output results in e.g.

====

This indicates an empty section text. In for example a pdf the output becomes garbled and unreadible.

Expected Result When no text after tag Background is present, then put the text e.g. "==== Background" in the output.

Workaround: Always add text after the tag Background.

Background: The background
   Given a global administrator named "Greg"
    And a blog named "Greg's anti-tax rants"