Use the original card description for replacing the checkboxes (fixes #2580)

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-11-18 22:11:16 +01:00
parent 6b41c80be4
commit 6e5df95e0a

View File

@@ -180,7 +180,7 @@ export default {
const clickedIndex = [...document.querySelector('#description-preview').querySelectorAll('input')].findIndex((li) => li.id === e.target.id)
const reg = /\[(X|\s|_|-)\]/ig
let nth = 0
const updatedDescription = this.description.replace(reg, (match, i, original) => {
const updatedDescription = this.card.description.replace(reg, (match, i, original) => {
let result = match
if ('' + nth++ === '' + clickedIndex) {
if (match.match(/^\[\s\]/i)) {