@@ -21,6 +21,15 @@ export function normalizeFilterResult(result) {
2121 return normalResult ;
2222}
2323
24+ function stripQuoteFallback ( text ) {
25+ const wrapper = document . createElement ( 'div' ) ;
26+ wrapper . innerHTML = text ;
27+
28+ wrapper . querySelector ( '.quote-inline' ) ?. remove ( ) ;
29+
30+ return wrapper . innerHTML ;
31+ }
32+
2433export function normalizeStatus ( status , normalOldStatus ) {
2534 const normalStatus = { ...status } ;
2635
@@ -86,6 +95,11 @@ export function normalizeStatus(status, normalOldStatus) {
8695 normalStatus . spoilerHtml = emojify ( escapeTextContentForBrowser ( spoilerText ) , emojiMap ) ;
8796 normalStatus . hidden = expandSpoilers ? false : spoilerText . length > 0 || normalStatus . sensitive ;
8897
98+ // Remove quote fallback link from the DOM so it doesn't mess with paragraph margins
99+ if ( normalStatus . quote ) {
100+ normalStatus . contentHtml = stripQuoteFallback ( normalStatus . contentHtml ) ;
101+ }
102+
89103 if ( normalStatus . url && ! ( normalStatus . url . startsWith ( 'http://' ) || normalStatus . url . startsWith ( 'https://' ) ) ) {
90104 normalStatus . url = null ;
91105 }
@@ -125,6 +139,11 @@ export function normalizeStatusTranslation(translation, status) {
125139 spoiler_text : translation . spoiler_text ,
126140 } ;
127141
142+ // Remove quote fallback link from the DOM so it doesn't mess with paragraph margins
143+ if ( status . get ( 'quote' ) ) {
144+ normalTranslation . contentHtml = stripQuoteFallback ( normalTranslation . contentHtml ) ;
145+ }
146+
128147 return normalTranslation ;
129148}
130149
0 commit comments