jolly-good-toolbelt / sphinx_gherkindoc

A tool to convert Gherkin into Sphinx documentation
https://jolly-good-toolbelt.github.io/sphinx_gherkindoc/
11 stars 10 forks source link

Fix.background glossary lines #18

Closed bradsbrown closed 5 years ago

bradsbrown commented 5 years ago

Ran across an issue where background steps were displaying the same line number repeatedly for each scenario in which the background step was active. This is an attempt to fix that.

NOTE: If we have any users that use the glossary logic externally, this does change the API slightly due to storing line numbers in a set rather than a list, so that might either mean a change in approach here or at least a larger version bump.

Sample of the issue:

Screen Shot 2019-08-30 at 3 00 36 PM
bbrownjc commented 5 years ago

As @rbcasperson points out, I should note that I tested this by building the package with my changes and installing on a work gherkin repo, and confirmed that line numbers only show up once:

Screen Shot 2019-08-30 at 4 29 45 PM