We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab919a6 commit ea17699Copy full SHA for ea17699
1 file changed
api/public/stackshared.php
@@ -92,7 +92,10 @@ function send() {
92
const inputs = json.questioninputs;
93
let correctAnswers = '';
94
// Show correct answers.
95
- for (const [name, input] of Object.entries(inputs)) {
+ const placeholders = question.matchAll(/\[\[input:([a-zA-Z][a-zA-Z0-9_]*)\]\]/g);
96
+ for (const holder of placeholders) {
97
+ const name = holder[1];
98
+ const input = inputs[name];
99
question = question.replace(`[[input:${name}]]`, input.render);
100
question = question.replace(`[[validation:${name}]]`, `<span name='${validationPrefix + name}'></span>`);
101
if (input.samplesolutionrender && name !== 'remember') {
0 commit comments