Merger removing unnecesarry parts of answers

This commit is contained in:
YourFriendlyNeighborhoodDealer 2018-12-13 09:04:32 +01:00
parent 147f660319
commit 1c5d24a326

View file

@ -18,11 +18,10 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
/*Question object // TODO: handle flags
* q: question // join json datas, or raw datas
* a: answer // or something else
* i: image
* */
class Question { class Question {
constructor(q, a, i) { constructor(q, a, i) {
this.Q = q; this.Q = q;
@ -232,6 +231,9 @@ function ReadData(data) {
// dont allow overwriting // dont allow overwriting
// ?!!!! // ?!!!!
if (!currQuestion.HasAnswer()) { if (!currQuestion.HasAnswer()) {
currData = currData.replace("A helyes válaszok: ", "");
currData = currData.replace("A helyes válasz: ", "");
currQuestion.A = currData; currQuestion.A = currData;
} }
ExpectedIdentifier = ['?', '>', '+']; ExpectedIdentifier = ['?', '>', '+'];