summaryrefslogtreecommitdiff
path: root/src/ast.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers+gitlab@digital-scurf.org>2020-05-09 12:22:26 +0000
committerDaniel Silverstone <dsilvers+gitlab@digital-scurf.org>2020-05-09 12:22:26 +0000
commitd5a205fa611b2824faa0a93efd9b9b4694dea945 (patch)
treeaf6a0b34101995a45fa98c9db4d81d5539d8fa0d /src/ast.rs
parent8d1ac8013d25a5bad7cc6c8c880f5bb1ccc67892 (diff)
parenta21ba1f5fcc9b03f7657c5b00c4c215286b06341 (diff)
downloadsubplot-d5a205fa611b2824faa0a93efd9b9b4694dea945.tar.gz
Merge branch 'keepkeyword' into 'master'
Change: keep actual text of keyword from scenario Closes #24 See merge request larswirzenius/subplot!38
Diffstat (limited to 'src/ast.rs')
-rw-r--r--src/ast.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/ast.rs b/src/ast.rs
index 7f4fd9c..bd6640b 100644
--- a/src/ast.rs
+++ b/src/ast.rs
@@ -830,12 +830,7 @@ fn step(
// Typeset first word, which is assumed to be a keyword, of a scenario
// step.
fn keyword(step: &ScenarioStep) -> Inline {
- let word = match step.kind() {
- StepKind::Given => "given",
- StepKind::When => "when",
- StepKind::Then => "then",
- };
- let word = inlinestr(word);
+ let word = inlinestr(step.keyword());
Inline::Emph(vec![word])
}