mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Wrap type answer output in code tag; remove extra div
This would make more sense as a class on the outer div, but existing templates reference code#typeans, so avoid breaking things for now.
This commit is contained in:
parent
eceacb643b
commit
340da23104
3 changed files with 6 additions and 2 deletions
|
@ -602,7 +602,7 @@ class Reviewer:
|
||||||
# can't pass a string in directly, and can't use re.escape as it
|
# can't pass a string in directly, and can't use re.escape as it
|
||||||
# escapes too much
|
# escapes too much
|
||||||
s = """
|
s = """
|
||||||
<span style="font-family: '{}'; font-size: {}px">{}</span>""".format(
|
<div style="font-family: '{}'; font-size: {}px">{}</div>""".format(
|
||||||
self.typeFont,
|
self.typeFont,
|
||||||
self.typeSize,
|
self.typeSize,
|
||||||
output,
|
output,
|
||||||
|
|
|
@ -90,7 +90,7 @@ impl DiffContext {
|
||||||
let provided = render_tokens(&output.provided);
|
let provided = render_tokens(&output.provided);
|
||||||
let expected = render_tokens(&output.expected);
|
let expected = render_tokens(&output.expected);
|
||||||
format!(
|
format!(
|
||||||
"<div style='white-space: pre-wrap;'>{}</div>",
|
"<code id=typeans>{}</code>",
|
||||||
if no_mistakes(&output.expected) {
|
if no_mistakes(&output.expected) {
|
||||||
provided
|
provided
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -52,6 +52,10 @@ li {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
code#typeans {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
.typeGood {
|
.typeGood {
|
||||||
background: #afa;
|
background: #afa;
|
||||||
color: black;
|
color: black;
|
||||||
|
|
Loading…
Reference in a new issue