Fix Mathjax can only be pasted once (#2869)

* Fix mathjax can be pasted only once

* Update about.py

* Update CONTRIBUTORS

* fix formatting
This commit is contained in:
Akash Reddy 2023-12-05 05:31:25 +05:30 committed by GitHub
parent 884e8dcac5
commit a5bdb28849
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View file

@ -149,7 +149,7 @@ Gustaf Carefall <https://github.com/Gustaf-C>
virinci <github.com/virinci> virinci <github.com/virinci>
snowtimeglass <snowtimeglass@gmail.com> snowtimeglass <snowtimeglass@gmail.com>
Ben Olson <github.com/grepgrok> Ben Olson <github.com/grepgrok>
Akash Reddy <github.com/akashreddy03> Akash Reddy <akashreddy2003@gmail.com>
Lucio Sauer <watermanpaint@posteo.net> Lucio Sauer <watermanpaint@posteo.net>
Gustavo Sales <gustavosmendes14@gmail.com> Gustavo Sales <gustavosmendes14@gmail.com>
Shawn M Moore <https://github.com/sartak> Shawn M Moore <https://github.com/sartak>

View file

@ -187,6 +187,7 @@ def show(mw: aqt.AnkiQt) -> QDialog:
"Mateusz Wojewoda", "Mateusz Wojewoda",
"Jarrett Ye", "Jarrett Ye",
"Gustavo Sales", "Gustavo Sales",
"Akash Reddy",
) )
) )

View file

@ -17,6 +17,11 @@ function restoreFrameHandles(mutations: MutationRecord[]): void {
const frameElement = mutation.target as FrameElement; const frameElement = mutation.target as FrameElement;
const framed = frameElement.querySelector(frameElement.frames!) as HTMLElement; const framed = frameElement.querySelector(frameElement.frames!) as HTMLElement;
if (!framed) {
frameElement.remove();
continue;
}
for (const node of mutation.addedNodes) { for (const node of mutation.addedNodes) {
if (node === framed || isFrameHandle(node)) { if (node === framed || isFrameHandle(node)) {
continue; continue;