diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index 32ace7269..74b9d9358 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -606,7 +606,7 @@ to a cloze type first, via Edit>Change Note Type.""" highest += 1 # must start at 1 highest = max(1, highest) - self.web.eval("wrap2('{{c%d::', '}}');" % highest) + self.web.eval("wrap('{{c%d::', '}}');" % highest) # Foreground colour ###################################################################### @@ -888,22 +888,22 @@ to a cloze type first, via Edit>Change Note Type.""" ###################################################################### def insertLatex(self): - self.web.eval("wrap2('[latex]', '[/latex]');") + self.web.eval("wrap('[latex]', '[/latex]');") def insertLatexEqn(self): - self.web.eval("wrap2('[$]', '[/$]');") + self.web.eval("wrap('[$]', '[/$]');") def insertLatexMathEnv(self): - self.web.eval("wrap2('[$$]', '[/$$]');") + self.web.eval("wrap('[$$]', '[/$$]');") def insertMathjaxInline(self): - self.web.eval("wrap2('\\\\(', '\\\\)');") + self.web.eval("wrap('\\\\(', '\\\\)');") def insertMathjaxBlock(self): - self.web.eval("wrap2('\\\\[', '\\\\]');") + self.web.eval("wrap('\\\\[', '\\\\]');") def insertMathjaxChemistry(self): - self.web.eval("wrap2('\\\\(\\\\ce{', '}\\\\)');") + self.web.eval("wrap('\\\\(\\\\ce{', '}\\\\)');") # Links from HTML ###################################################################### diff --git a/qt/ts/src/editor.ts b/qt/ts/src/editor.ts index e5f230c45..ae70a31ce 100644 --- a/qt/ts/src/editor.ts +++ b/qt/ts/src/editor.ts @@ -284,13 +284,12 @@ function maybeDisableButtons() { } } -/* old method, kept around for the benefit of add-ons that were using it */ function wrap(front, back) { wrapInternal(front, back, false); } -/* new method */ -function wrap2(front, back) { +/* currently unused */ +function wrapIntoText(front, back) { wrapInternal(front, back, true); }