PicklesDoc.Pickles.DocumentationBuilders.Word.WordStepFormatter.Format C# (CSharp) Method

Format() public method

public Format ( Body body, Step step ) : void
body Body
step PicklesDoc.Pickles.ObjectModel.Step
return void
        public void Format(Body body, Step step)
        {
            var paragraph = GenerateStepParagraph(step);
            body.Append(paragraph);

            if (!string.IsNullOrEmpty(step.DocStringArgument))
            {
                string[] lines = step.DocStringArgument.Split(
                    new[] { Environment.NewLine },
                    StringSplitOptions.RemoveEmptyEntries);
                foreach (string line in lines)
                {
                    body.GenerateParagraph(line, "Quote");
                }
            }

            if (step.TableArgument != null)
            {
                this.wordTableFormatter.Format(body, step.TableArgument);
            }
        }