trgkanki / cloze_hide_all

GNU Affero General Public License v3.0
11 stars 3 forks source link

Strange error. #40

Closed huandney closed 3 years ago

huandney commented 3 years ago

Bug report

Describe the bug

I've already installed and reinstalled, but I can't seem to get it to work. The error is described below.

Reproduction step

Steps to reproduce the behavior:

  1. Go to ADD
  2. I choose the type: cloze (Hide All)
  3. I write a sentence, example: the french revolution ended in {{c1::1799}}
  4. and I have the following text on the card:

/ !-- a81b1bee0481ede2 / cloze2_w:before { content: "[...]"; font-weight: bold; color: gray; } /* Css styling of visible cloze on the back / cloze2 { display: none; } .cloze cloze2_w { display: none; } .cloze cloze2 { display: inline; } / a81b1bee0481ede2 --! / the french revolution ended in [...]

Actual behavior

bug1 bug2 bug3 bug4

Anki / OS versions

-Windows 10

phu54321 commented 3 years ago

Confirmed. Issue due to template migrator

phu54321 commented 3 years ago

Could you try prepending <style> and appending </style> on the problematic front template code block? like this

<style>
/* !-- a81b1bee0481ede2 */
cloze2_w {
  display: inline-block;
  width: 5em;
  height: 1em;
  background-color: #ffeba2;
}/** Css styling of visible cloze on the back */

cloze2 {
  display: none;
}

.cloze cloze2_w {
  display: none;
}

.cloze cloze2 {
  display: inline;
}

/* a81b1bee0481ede2 --! */
</style>

I'm little hesitant to create an automated fixer for this issue, since automated fixers tends to create new issues on and on.

huandney commented 3 years ago

Could you try prepending on the problematic front template code block? like this

<style>
/* !-- a81b1bee0481ede2 */
cloze2_w {
  display: inline-block;
  width: 5em;
  height: 1em;
  background-color: #ffeba2;
}/** Css styling of visible cloze on the back */

cloze2 {
  display: none;
}

.cloze cloze2_w {
  display: none;
}

.cloze cloze2 {
  display: inline;
}

/* a81b1bee0481ede2 --! */
</style>

I'm little hesitant to create an automated fixer for this issue, since automated fixers tends to create new issues on and on.

I tested it here, it's working perfectly now. Thanks.

phu54321 commented 3 years ago

Issue resolved. I'll leave the issue open cause this might be solved later.

Maha189 commented 3 years ago

thanks! I had the exact same problem and this worked perfectly.

phu54321 commented 3 years ago

While this issue will be fixed on the next update, when you have issues again you can use 'Reset template' option. instruction