fix weird commit
This commit is contained in:
parent
032ed7b627
commit
c6e14ac11e
11
flash
11
flash
|
|
@ -330,16 +330,11 @@ ${LGREY}Select a number to continue, or${NC} ${LRED}Q${NC} ${LGREY}to quit...${N
|
|||
|
||||
# Update item score for each flashcard item
|
||||
## Remove forward slashes in the Questions and answers
|
||||
<<<<<<< Updated upstream
|
||||
QUESTION_REGEX=$(sed "s/\(\/\|\[\|\]\|\*\)/\\\\\1/g" <<<"${q[1]}")
|
||||
ANSWER_REGEX=$(sed "s/\(\/\|\[\|\]\|\*\)/\\\\\1/g" <<<"${q[2]}")
|
||||
=======
|
||||
|
||||
QUESTION_REGEX="$(sed "s/\(\/\|\[\|\]\|\*\)/\\\\\1/g" <<<"${q[1]}")"
|
||||
ANSWER_REGEX="$(sed "s/\(\/\|\[\|\]\|\*\)/\\\\\1/g" <<<"${q[2]}")"
|
||||
# sed -i "s/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:${q[3]}/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:$NEW_ITEM_SCORE/g" "$DECK"
|
||||
>>>>>>> Stashed changes
|
||||
sed -i .bak "s/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:${q[3]}/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:$NEW_ITEM_SCORE/g" "$DECK"
|
||||
rm ./*.bak
|
||||
sed -i .bak "s/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:${q[3]}/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:$NEW_ITEM_SCORE/g" "$DECK" && rm ./*.bak
|
||||
|
||||
# If no highscore currently set, set it.
|
||||
[ -z "$(cat "$HIGH_SCORE")" ] && echo "$COUNTER" >"$HIGH_SCORE"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue