Clean up docs and test

This commit is contained in:
Veronica K. B. Olsen
2020-08-23 20:55:54 +02:00
parent 5f033a98bf
commit f1f7697df2
3 changed files with 10 additions and 21 deletions
+1 -2
View File
@@ -415,8 +415,7 @@ combination for the inserted character or punctuation.
":kbd:`Ctrl`:kbd:`K`, :kbd:`2`", "Insert a right single quote." ":kbd:`Ctrl`:kbd:`K`, :kbd:`2`", "Insert a right single quote."
":kbd:`Ctrl`:kbd:`K`, :kbd:`3`", "Insert a left double quote." ":kbd:`Ctrl`:kbd:`K`, :kbd:`3`", "Insert a left double quote."
":kbd:`Ctrl`:kbd:`K`, :kbd:`4`", "Insert a right double quote." ":kbd:`Ctrl`:kbd:`K`, :kbd:`4`", "Insert a right double quote."
":kbd:`Ctrl`:kbd:`K`, :kbd:`'`", "Insert a modifier single apostrophe." ":kbd:`Ctrl`:kbd:`K`, :kbd:`'`", "Insert a modifier apostrophe."
":kbd:`Ctrl`:kbd:`K`, :kbd:`""`", "Insert a modifier double apostrophe."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Return`", "Insert a hard line break." ":kbd:`Ctrl`:kbd:`K`, :kbd:`Return`", "Insert a hard line break."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Space`", "Insert a non-breaking space." ":kbd:`Ctrl`:kbd:`K`, :kbd:`Space`", "Insert a non-breaking space."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Shift`:kbd:`Space`", "Insert a thin space." ":kbd:`Ctrl`:kbd:`K`, :kbd:`Shift`:kbd:`Space`", "Insert a thin space."
+9 -15
View File
@@ -52,26 +52,20 @@ Modifier Letter Apostrophes
--------------------------- ---------------------------
The auto-replace feature will consider any right-facing single straight quote as a quote symbol, The auto-replace feature will consider any right-facing single straight quote as a quote symbol,
even if it's intended as an apostrophe. This also includes the syntax highlighter, which may decide even if it's intended as an apostrophe. This also includes the syntax highlighter, which may assume
to use an apostrophe as the closing symbol of a single quoted string. the first following apostrophe is the closing symbol of a single quoted region of text.
Alternative apostrophes, both single and double, are available. They are special Unicode characters To get around this, an alternative apostrophe is available. It is a special Unicode character that
that are not categorised as punctuation, but modifiers. They are usually renderred the same way as is not categorised as punctuation, but as a modifier. It is usually renderred the same way as right
right single and double quotation marks, but not always, depending on the font. single quotation marks, but not always, depending on the font. There is a Wikipedia article for the
`Modifier letter apostrophe`_ with more details.
There is a Wikipedia article for both the single_ and double_ version of this symbol, explaining
what they're for.
You can use these symbols if you want, and especially if you have an apostrophe within a single
quoted piece of text.
.. note:: .. note::
On export with the :guilabel:`Build Novel Project` tool, these apostrophes will be replaced On export with the :guilabel:`Build Novel Project` tool, these apostrophes will be replaced
automatically with the corresponding right hand quote symbols. In that respect, it doesn't matter automatically with the corresponding right hand quote symbols as is generally recommended.
if you mix them. Therefore it doesn't really matter if you only use them to correct highlighting.
.. _single: https://en.wikipedia.org/wiki/Modifier_letter_apostrophe .. _Modifier letter apostrophe: https://en.wikipedia.org/wiki/Modifier_letter_apostrophe
.. _double: https://en.wikipedia.org/wiki/Modifier_letter_double_apostrophe
Special Space Symbols Special Space Symbols
-4
View File
@@ -1053,10 +1053,6 @@ def testInsertMenu(qtbot, nwTempGUI, nwFuncTemp, nwTemp):
assert nwGUI.docEditor.getText() == nwUnicode.U_MAPOSS assert nwGUI.docEditor.getText() == nwUnicode.U_MAPOSS
nwGUI.docEditor.clear() nwGUI.docEditor.clear()
nwGUI.mainMenu.aInsMDApos.activate(QAction.Trigger)
assert nwGUI.docEditor.getText() == nwUnicode.U_MAPOSD
nwGUI.docEditor.clear()
nwGUI.mainMenu.aInsHardBreak.activate(QAction.Trigger) nwGUI.mainMenu.aInsHardBreak.activate(QAction.Trigger)
assert nwGUI.docEditor.getText() == " \n" assert nwGUI.docEditor.getText() == " \n"
nwGUI.docEditor.clear() nwGUI.docEditor.clear()