mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02: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
|
||||
# escapes too much
|
||||
s = """
|
||||
<span style="font-family: '{}'; font-size: {}px">{}</span>""".format(
|
||||
<div style="font-family: '{}'; font-size: {}px">{}</div>""".format(
|
||||
self.typeFont,
|
||||
self.typeSize,
|
||||
output,
|
||||
|
|
|
@ -90,7 +90,7 @@ impl DiffContext {
|
|||
let provided = render_tokens(&output.provided);
|
||||
let expected = render_tokens(&output.expected);
|
||||
format!(
|
||||
"<div style='white-space: pre-wrap;'>{}</div>",
|
||||
"<code id=typeans>{}</code>",
|
||||
if no_mistakes(&output.expected) {
|
||||
provided
|
||||
} else {
|
||||
|
|
|
@ -52,6 +52,10 @@ li {
|
|||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
code#typeans {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.typeGood {
|
||||
background: #afa;
|
||||
color: black;
|
||||
|
|
Loading…
Reference in a new issue