Set autoreplace characters with unicode code instead to make it easier to read the source code

This commit is contained in:
Veronica K. B. Olsen
2019-10-25 00:06:39 +02:00
parent 2abacc1b2f
commit a67d3ed599
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -87,8 +87,8 @@ class Config:
self.doReplaceDots = True
self.wordCountTimer = 5.0
self.fmtSingleQuotes = ["",""]
self.fmtDoubleQuotes = ["",""]
self.fmtSingleQuotes = ["\u2018","\u2019"]
self.fmtDoubleQuotes = ["\u201c","\u201d"]
self.spellLanguage = "en_GB"
+4 -4
View File
@@ -422,15 +422,15 @@ class GuiDocEditor(QTextEdit):
elif self.mainConf.doReplaceDash and theTwo == "--":
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.insertText("")
theCursor.insertText("\u2014")
elif self.mainConf.doReplaceDots and theThree == "...":
theCursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor, 3)
theCursor.insertText("")
theCursor.insertText("\u2026")
return