In my Java program, I have parsed a Cucumber Feature File to a GherkinDocument. I have edited some tags in this Document. Now I want to write the Code of the GherkinDocument in a Feature File.
For that, I want to translate the Gherkin Document to a String or String Array, a De-Parsing if you will. This is how I parsed the Feature File Text to a GherkinDocument:
Parser<GherkinDocument> parser = new Parser<>(new GherkinDocumentBuilder(idGenerator));
GherkinDocument doc = parser.parse(reader);
return doc;
The Parser is from the repo: https://github.com/cucumber/common/blob/gherkin/v21.0.0/gherkin/java/src/test/java/io/cucumber/gherkin/GherkinDocumentBuilderTest.java
Is there a way to do this?
Thank you very much and regards, Lukas