prevent response poll displaying for true / false

This commit is contained in:
KDSBrowne 2023-03-15 13:36:40 +00:00
parent 3e3d18f73b
commit c4d45e94b6

View File

@ -92,6 +92,9 @@ const parseCurrentSlideContent = (yesValue, noValue, abstentionValue, trueValue,
const yesNoPatt = /.*(yes\/no|no\/yes).*/gm;
const hasYN = safeMatch(yesNoPatt, content, false);
const trueFalsePatt = /.*(true\/false|false\/true).*/gm;
const hasTF = safeMatch(trueFalsePatt, content, false);
const pollRegex = /\b[1-9A-Ia-i][.)] .*/g;
let optionsPoll = safeMatch(pollRegex, content, []);
const optionsWithLabels = [];
@ -163,7 +166,7 @@ const parseCurrentSlideContent = (yesValue, noValue, abstentionValue, trueValue,
}
});
if (question.length > 0 && optionsPoll.length === 0 && !doubleQuestion && !hasYN) {
if (question.length > 0 && optionsPoll.length === 0 && !doubleQuestion && !hasYN && !hasTF) {
quickPollOptions.push({
type: 'R-',
poll: {