mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
This reverts commit 9ced6be03e
.
Caused a regression:
https://forums.ankiweb.net/t/anki-24-10-beta/49989/150
This commit is contained in:
parent
e79060487b
commit
b3a85a6515
2 changed files with 3 additions and 5 deletions
|
@ -17,9 +17,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
return match.remove();
|
return match.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
const fontWeight = getComputedStyle(element).fontWeight;
|
const fontWeight = element.style.fontWeight;
|
||||||
const threshold = 700;
|
if (fontWeight === "bold" || Number(fontWeight) >= 700) {
|
||||||
if (fontWeight && Number(fontWeight) >= threshold) {
|
|
||||||
return match.clear((): void => {
|
return match.clear((): void => {
|
||||||
if (
|
if (
|
||||||
removeStyleProperties(element, "font-weight") &&
|
removeStyleProperties(element, "font-weight") &&
|
||||||
|
|
|
@ -17,8 +17,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
return match.remove();
|
return match.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
const fontStyle = getComputedStyle(element).fontStyle;
|
if (["italic", "oblique"].includes(element.style.fontStyle)) {
|
||||||
if (["italic", "oblique"].includes(fontStyle)) {
|
|
||||||
return match.clear((): void => {
|
return match.clear((): void => {
|
||||||
if (
|
if (
|
||||||
removeStyleProperties(element, "font-style") &&
|
removeStyleProperties(element, "font-style") &&
|
||||||
|
|
Loading…
Reference in a new issue