Set autoreplace characters with unicode code instead to make it easier to read the source code
This commit is contained in:
+2
-2
@@ -87,8 +87,8 @@ class Config:
|
|||||||
self.doReplaceDots = True
|
self.doReplaceDots = True
|
||||||
self.wordCountTimer = 5.0
|
self.wordCountTimer = 5.0
|
||||||
|
|
||||||
self.fmtSingleQuotes = ["‘","’"]
|
self.fmtSingleQuotes = ["\u2018","\u2019"]
|
||||||
self.fmtDoubleQuotes = ["“","”"]
|
self.fmtDoubleQuotes = ["\u201c","\u201d"]
|
||||||
|
|
||||||
self.spellLanguage = "en_GB"
|
self.spellLanguage = "en_GB"
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -422,15 +422,15 @@ class GuiDocEditor(QTextEdit):
|
|||||||
|
|
||||||
elif self.mainConf.doReplaceDash and theTwo == "--":
|
elif self.mainConf.doReplaceDash and theTwo == "--":
|
||||||
theCursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor, 2)
|
theCursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor, 2)
|
||||||
theCursor.insertText("–")
|
theCursor.insertText("\u2013")
|
||||||
|
|
||||||
elif self.mainConf.doReplaceDash and theTwo == "–-":
|
elif self.mainConf.doReplaceDash and theTwo == "\u2013-":
|
||||||
theCursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor, 2)
|
theCursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor, 2)
|
||||||
theCursor.insertText("—")
|
theCursor.insertText("\u2014")
|
||||||
|
|
||||||
elif self.mainConf.doReplaceDots and theThree == "...":
|
elif self.mainConf.doReplaceDots and theThree == "...":
|
||||||
theCursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor, 3)
|
theCursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor, 3)
|
||||||
theCursor.insertText("…")
|
theCursor.insertText("\u2026")
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user