diff --git a/CHANGELOG.md b/CHANGELOG.md index 3356caa..6a1b588 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v4.2.1] - unreleased +### Fixed +- Transpiled KSAs no longer dropped + ## [v4.2.0] - 2020-03-26 ### Changed - example/5/draggable.js fix for FireFox to prevent dropping a draggable trying to load a URL diff --git a/pkg/transpile/common_test.go b/pkg/transpile/common_test.go index 6a51cfc..a15cb15 100644 --- a/pkg/transpile/common_test.go +++ b/pkg/transpile/common_test.go @@ -17,6 +17,9 @@ success: mastery: say mrr attachments: - moo.txt +ksas: + - a1 + - b2 --- YAML body `) diff --git a/pkg/transpile/puzzle.go b/pkg/transpile/puzzle.go index 8222ce0..84c90f5 100644 --- a/pkg/transpile/puzzle.go +++ b/pkg/transpile/puzzle.go @@ -184,6 +184,7 @@ func (fp FsPuzzle) Puzzle() (Puzzle, error) { puzzle.Answers = static.Answers puzzle.Authors = static.Authors puzzle.Objective = static.Objective + puzzle.KSAs = static.KSAs puzzle.Success = static.Success puzzle.Body = string(body) puzzle.AnswerPattern = static.AnswerPattern diff --git a/pkg/transpile/puzzle_test.go b/pkg/transpile/puzzle_test.go index a8a6be4..47db867 100644 --- a/pkg/transpile/puzzle_test.go +++ b/pkg/transpile/puzzle_test.go @@ -35,6 +35,12 @@ func TestPuzzle(t *testing.T) { if p.Success.Mastery != "say mrr" { t.Error("Wrong Success.Mastery") } + if len(p.KSAs) != 2 { + t.Error("KSAs are wrong") + } + if p.KSAs[0] != "a1" { + t.Error("KSAs[0] wrong") + } if p.Body != "
YAML body
\n" { t.Errorf("Body parsed wrong: %#v", p.Body) }