mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
With the new duplicate appearance, excluding the bg color becomes viable
https://forums.ankiweb.net/t/incorrect-text-formatting-copied/24060
This commit is contained in:
parent
22f54c2c01
commit
8b53b2210d
2 changed files with 7 additions and 4 deletions
|
@ -35,9 +35,13 @@ describe("filterHTML", () => {
|
||||||
expect(
|
expect(
|
||||||
filterHTML('<span style="background-color: blue;">x</span>', false, false),
|
filterHTML('<span style="background-color: blue;">x</span>', false, false),
|
||||||
).toBe("x");
|
).toBe("x");
|
||||||
// or if it's an internal paste
|
// no filtering on internal paste
|
||||||
expect(
|
expect(
|
||||||
filterHTML('<span style="background-color: blue;"></span>', true, true),
|
filterHTML(
|
||||||
).toBe('<span style=""></span>');
|
'<span style="background-color: transparent;"></span>',
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
).toBe('<span style="background-color: transparent;"></span>');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -44,7 +44,6 @@ export const filterStylingLightMode = filterStyling(discard, {
|
||||||
...nightModeExceptions,
|
...nightModeExceptions,
|
||||||
});
|
});
|
||||||
export const filterStylingInternal = filterStyling(keep, {
|
export const filterStylingInternal = filterStyling(keep, {
|
||||||
"background-color": discard,
|
|
||||||
"font-size": discard,
|
"font-size": discard,
|
||||||
"font-family": discard,
|
"font-family": discard,
|
||||||
width: discard,
|
width: discard,
|
||||||
|
|
Loading…
Reference in a new issue