Skip to content

Commit 37eead3

Browse files
carooobregoni80and
authored andcommitted
DOP-2354 - Add quiz-date option to quiz directive (#334)
1 parent 6ad7056 commit 37eead3

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

snooty/rstspec.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,10 +712,12 @@ content_type = "block"
712712
help = "Embed a quiz with a question argument, using the quizchoice directive to construct answer options."
713713
example = """.. quiz::
714714
:quiz-id: ${1:string}
715-
716-
${2:string}"""
715+
:quiz-date: ${2:string}
716+
717+
${3:string}"""
717718
argument_type = "string"
718719
options.quiz-id = {type = "string", required = true}
720+
options.quiz-date = "string"
719721

720722
[directive."mongodb:quizchoice"]
721723
content_type = "block"

snooty/test_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_quiz() -> None:
3838
check_ast_testing_string(
3939
page.ast,
4040
"""<root fileid="test_quiz.rst">
41-
<directive name="quiz" domain="mongodb" quiz-id="mongoacc1">
41+
<directive name="quiz" domain="mongodb" quiz-id="mongoacc1" quiz-date="2021-06-21">
4242
<paragraph><text>With my MongoDB account, I can now access?</text></paragraph>
4343
<directive name="quizchoice" domain="mongodb">
4444
<text>MongoDB Atlas</text>

test_data/test_quiz.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.. quiz::
22
:quiz-id: mongoacc1
3+
:quiz-date: 2021-06-21
34

45
With my MongoDB account, I can now access?
56

0 commit comments

Comments
 (0)