mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
fix
This commit is contained in:
parent
f2bf3bc0d4
commit
4d9852cbcc
@ -133,7 +133,9 @@ class TextBrowser(QWidget, dataget):
|
|||||||
def gen_html(self, *args):
|
def gen_html(self, *args):
|
||||||
currenttype = globalconfig["rendertext_using_internal"]["webview"]
|
currenttype = globalconfig["rendertext_using_internal"]["webview"]
|
||||||
try:
|
try:
|
||||||
__ = importlib.import_module(f"rendertext.internal.webview.{currenttype}")
|
__ = importlib.import_module(
|
||||||
|
f"rendertext.internal.webview.{currenttype}"
|
||||||
|
).TextLine
|
||||||
except:
|
except:
|
||||||
from traceback import print_exc
|
from traceback import print_exc
|
||||||
|
|
||||||
@ -141,10 +143,10 @@ class TextBrowser(QWidget, dataget):
|
|||||||
globalconfig["rendertext_using_internal"]["webview"] = currenttype = list(
|
globalconfig["rendertext_using_internal"]["webview"] = currenttype = list(
|
||||||
globalconfig["rendertext"]["webview"].keys()
|
globalconfig["rendertext"]["webview"].keys()
|
||||||
)[0]
|
)[0]
|
||||||
__ = importlib.import_module(f"rendertext.internal.webview.{currenttype}")
|
__ = importlib.import_module(
|
||||||
return __.TextLine(currenttype, self.webivewwidget.webview, self).gen_html__(
|
f"rendertext.internal.webview.{currenttype}"
|
||||||
*args
|
).TextLine
|
||||||
)
|
return __(currenttype, self.webivewwidget.webview, self).gen_html__(*args)
|
||||||
|
|
||||||
def _webview_append(self, _id, origin, atcenter, text, tag, flags, color):
|
def _webview_append(self, _id, origin, atcenter, text, tag, flags, color):
|
||||||
text = text.replace("\n", "<br>").replace("\\", "\\\\")
|
text = text.replace("\n", "<br>").replace("\\", "\\\\")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user