Adding non-breaking space support for editor and html, latex export

This commit is contained in:
Veronica K. B. Olsen
2019-10-29 14:49:11 +01:00
parent 146756a395
commit 489eae2e0d
10 changed files with 104 additions and 54 deletions
+38 -30
View File
@@ -149,7 +149,9 @@ class nwUnicode:
"""Suppoted unicode character constants and translation maps.
"""
# Quotation Marks
# Unicode Constants
## Quotation Marks
U_QUOT = "\u0022" # Quotation mark
U_APOS = "\u0027" # Apostrophe
U_LAQUO = "\u00ab" # Left-pointing double angle quotation mark
@@ -170,38 +172,44 @@ class nwUnicode:
U_LWCQUO = "\u300e" # Left white corner bracket
U_RECQUO = "\u300f" # Right white corner bracket
# Punctuation
U_NDASH = "\u2013" # Short dash
U_MDASH = "\u2014" # Long dash
## Punctuation
U_ENDASH = "\u2013" # Short dash
U_EMDASH = "\u2014" # Long dash
U_HELLIP = "\u2026" # Ellipsis
# Other
## Other
U_NBSP = "\u00a0" # Non-breaking space
U_PARA = "\u2029" # Paragraph separator
HTML = {
U_QUOT : """,
U_APOS : "'",
U_LAQUO : "«",
U_RAQUO : "»",
U_LSQUO : "‘",
U_RSQUO : "’",
U_SBQUO : "‚",
U_SUQUO : "‛",
U_LDQUO : "“",
U_RDQUO : "”",
U_BDQUO : "„",
U_UDQUO : "‟",
U_LSAQUO : "‹",
U_RSAQUO : "›",
U_BDRQUO : "⹂",
U_LCQUO : "「",
U_RCQUO : "」",
U_LWCQUO : "『",
U_LWCQUO : "『",
U_NDASH : "–",
U_MDASH : "—",
U_HELLIP : "…",
U_NBSP : " ",
}
# HTML Equivalents
## Quotes
H_QUOT = """
H_APOS = "'"
H_LAQUO = "«"
H_RAQUO = "»"
H_LSQUO = "‘"
H_RSQUO = "’"
H_SBQUO = "‚"
H_SUQUO = "‛"
H_LDQUO = "“"
H_RDQUO = "”"
H_BDQUO = "„"
H_UDQUO = "‟"
H_LSAQUO = "‹"
H_RSAQUO = "›"
H_BDRQUO = "⹂"
H_LCQUO = "「"
H_RCQUO = "」"
H_LWCQUO = "『"
H_LWCQUO = "『"
## Punctuation
H_ENDASH = "–"
H_EMDASH = "—"
H_HELLIP = "…"
## Other
H_NBSP = " "
# END Class nwUnicode