From 8b53b2210d3cd3c51348c72e95271516d542fd99 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 24 Oct 2022 09:24:48 +1000 Subject: [PATCH] With the new duplicate appearance, excluding the bg color becomes viable https://forums.ankiweb.net/t/incorrect-text-formatting-copied/24060 --- ts/html-filter/index.test.ts | 10 +++++++--- ts/html-filter/styling.ts | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ts/html-filter/index.test.ts b/ts/html-filter/index.test.ts index 0da156901..98a5403d8 100644 --- a/ts/html-filter/index.test.ts +++ b/ts/html-filter/index.test.ts @@ -35,9 +35,13 @@ describe("filterHTML", () => { expect( filterHTML('x', false, false), ).toBe("x"); - // or if it's an internal paste + // no filtering on internal paste expect( - filterHTML('', true, true), - ).toBe(''); + filterHTML( + '', + true, + true, + ), + ).toBe(''); }); }); diff --git a/ts/html-filter/styling.ts b/ts/html-filter/styling.ts index 0a24469d3..db189859e 100644 --- a/ts/html-filter/styling.ts +++ b/ts/html-filter/styling.ts @@ -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,