mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -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(
|
||||
filterHTML('<span style="background-color: blue;">x</span>', false, false),
|
||||
).toBe("x");
|
||||
// or if it's an internal paste
|
||||
// no filtering on internal paste
|
||||
expect(
|
||||
filterHTML('<span style="background-color: blue;"></span>', true, true),
|
||||
).toBe('<span style=""></span>');
|
||||
filterHTML(
|
||||
'<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,
|
||||
});
|
||||
export const filterStylingInternal = filterStyling(keep, {
|
||||
"background-color": discard,
|
||||
"font-size": discard,
|
||||
"font-family": discard,
|
||||
width: discard,
|
||||
|
|
Loading…
Reference in a new issue