summaryrefslogtreecommitdiff
path: root/subplot.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-04-30 07:48:25 +0300
committerLars Wirzenius <liw@liw.fi>2023-04-30 08:01:23 +0300
commit669c1dff64a45350b61e3cc0b393a72191dd2a37 (patch)
tree2b52c1bc8bb8ab3b1c64f5293d4f8d120044fa9a /subplot.md
parent76c290a9e46b5e9fb9021565d6fd84b9a38fa390 (diff)
downloadsubplot-669c1dff64a45350b61e3cc0b393a72191dd2a37.tar.gz
fix: extraction of plain text in scenario titles
When I changed Subplot to use pulldown_cmark for parsing markdown, I introduced a bug: if a scenario title uses markup (e.g., bold face), that part of the title was dropped when it was converted into scenario title. Fix that. Sponsored-by: author
Diffstat (limited to 'subplot.md')
-rw-r--r--subplot.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/subplot.md b/subplot.md
index 934623e..05edeae 100644
--- a/subplot.md
+++ b/subplot.md
@@ -1275,6 +1275,40 @@ impls: { python: [] }
# Introduction
~~~~
+## Scenario titles
+
+A scenario gets its title from the lowest level of section heading
+that applies to it. The heading can use markup.
+
+~~~scenario
+given file scenario-titles.subplot
+given file scenario-titles.md
+given file b.yaml
+given file f.py
+given an installed subplot
+when I run subplot metadata scenario-titles.subplot
+then stdout contains "My fun scenario title"
+~~~
+
+~~~~{#scenario-titles.subplot .file .yaml .numberLines}
+title: Test scenario
+markdowns:
+- scenario-titles.md
+bindings: [b.yaml]
+impls:
+ python: [f.py]
+~~~~
+
+~~~~{#scenario-titles.md .file .markdown .numberLines}
+# My **fun** _scenario_ `title`
+
+```scenario
+given precondition foo
+when I do bar
+then bar was done
+```
+~~~~
+
## Empty lines in scenarios
This scenario verifies that empty lines in scenarios are OK.