aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Docx.hs
diff options
context:
space:
mode:
authorOphir Lifshitz <hangfromthefloor@gmail.com>2015-10-04 06:07:23 -0400
committerOphir Lifshitz <hangfromthefloor@gmail.com>2015-10-04 06:11:07 -0400
commit0b899ce7efa80df700b17b7a4b9f6de1fb88ce8c (patch)
tree9b5c06fecb8bd394cb211d807fdacdb5662f1c38 /src/Text/Pandoc/Readers/Docx.hs
parent6d0e586b2d5f71bbbfccb9978329e6fadfb85b7b (diff)
downloadpandoc-0b899ce7efa80df700b17b7a4b9f6de1fb88ce8c.tar.gz
Docx Reader: Parse soft, no-break hyphen elements
Diffstat (limited to 'src/Text/Pandoc/Readers/Docx.hs')
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs
index 67a97ae85..8b8d1ede1 100644
--- a/src/Text/Pandoc/Readers/Docx.hs
+++ b/src/Text/Pandoc/Readers/Docx.hs
@@ -206,11 +206,15 @@ runElemToInlines :: RunElem -> Inlines
runElemToInlines (TextRun s) = text s
runElemToInlines (LnBrk) = linebreak
runElemToInlines (Tab) = space
+runElemToInlines (SoftHyphen) = text "\xad"
+runElemToInlines (NoBreakHyphen) = text "\x2011"
runElemToString :: RunElem -> String
runElemToString (TextRun s) = s
runElemToString (LnBrk) = ['\n']
runElemToString (Tab) = ['\t']
+runElemToString (SoftHyphen) = ['\xad']
+runElemToString (NoBreakHyphen) = ['\x2011']
runToString :: Run -> String
runToString (Run _ runElems) = concatMap runElemToString runElems