Skip to content

Commit fe49378

Browse files
Lab input1: Move answers into JavaScript
Signed-off-by: David A. Wheeler <[email protected]>
1 parent 5a31b1c commit fe49378

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

docs/labs/input1.html

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@
1212

1313
<!-- See create_labs.md for how to create your own lab! -->
1414

15-
<!-- Sample expected answer -->
16-
<script id="expected0" type="plain/text">
17-
query('id').isInt({min: 1, max: 9999}),
18-
</script>
19-
20-
<!-- Full pattern of correct answer -->
21-
<script id="correct0" type="plain/text">
22-
\s* query \( ('id'|"id"|`id`) \) \.
23-
isInt \( \{ min: 1 , max: 9_?999 ,? \} \) , \s*
24-
</script>
25-
2615
</head>
2716
<body>
2817
<!-- For GitHub Pages formatting: -->

docs/labs/input1.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ info =
8888
]
8989
}
9090
],
91+
expected: [
92+
"query('id').isInt({min: 1, max: 9999}),"
93+
],
94+
correct: [
95+
String.raw`\s* query \( ('id'|"id"|${BACKQUOTE}id${BACKQUOTE}) \) \.
96+
\s* isInt \( \{ min: 1 , max: 9_?999 ,? \} \) , \s*`
97+
],
9198
successes: [
9299
[ " query ( 'id' ) . isInt ( {min: 1 , max: 9999 } ) ," ],
93100
[ " query ( `id` ) . isInt ( {min: 1 , max: 9_999 } ) , " ],

0 commit comments

Comments
 (0)