mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
undo gift parser replacing
This commit is contained in:
parent
19130d8f44
commit
f8b1a8421b
1 changed files with 3 additions and 11 deletions
|
|
@ -69,17 +69,9 @@ const DownloadQuizModal: React.FC<DownloadQuizModalProps> = ({ quiz }) => {
|
|||
doc.setFontSize(16);
|
||||
|
||||
selectedQuiz.content.forEach((question, index) => {
|
||||
let formattedQuestion = question.trim();
|
||||
|
||||
|
||||
if (!withAnswers) {
|
||||
formattedQuestion = formattedQuestion.replace(/::.*?::/g, '')
|
||||
.replace(/\/\/.*$/gm, '')
|
||||
.replace(/#[^\n]*/g, '')
|
||||
.replace(/=/g, '')
|
||||
.replace(/~/g, '')
|
||||
.replace(/\{(.*?)\}/g, '{$1}');
|
||||
}
|
||||
const formattedQuestion = withAnswers
|
||||
? question
|
||||
: question.replace(/\{[^}]+\}/g, '');
|
||||
|
||||
const wrappedText = doc.splitTextToSize(`${index + 1}. ${formattedQuestion}`, 180);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue