1 parent
6e3335aad8
commit
2c464c8b11
4 files changed
+44
-1
No files matched your search
@@ -1219,7 +1219,7 @@ elemToParPart' ns element
|
||||
(matchQName "drawingml" "chart" (Just "c") "chart") drawingElem
|
||||
= return [Chart]
|
||||
elemToParPart' ns element
|
||||
| isElem ns "w" "r" element = do
|
||||
| isElem ns "w" "r" element || isElem ns "w" "customXml" element = do
|
||||
runs <- elemToRun ns element
|
||||
return $ map PlainRun runs
|
||||
elemToParPart' ns element
|
||||
@@ -1364,6 +1364,9 @@ elemToRun ns element
|
||||
runElems <- elemToRunElems ns element
|
||||
runStyle <- elemToRunStyleD ns element
|
||||
return [Run runStyle runElems]
|
||||
elemToRun ns element
|
||||
| isElem ns "w" "customXml" element =
|
||||
mconcat <$> mapM (elemToRun ns) (elChildren element)
|
||||
elemToRun _ _ = throwError WrongElem
|
||||
|
||||
getParentStyleValue :: (ParStyle -> Maybe a) -> ParStyle -> Maybe a
|
||||
|
||||
@@ -219,6 +219,10 @@ tests = [ testGroup "document"
|
||||
"nested Smart Tags"
|
||||
"docx/nested_smart_tags.docx"
|
||||
"docx/nested_smart_tags.native"
|
||||
, testCompare
|
||||
"inline customXml elements"
|
||||
"docx/custom_xml.docx"
|
||||
"docx/custom_xml.native"
|
||||
, testCompare
|
||||
"remove anchor spans with nothing pointing to them"
|
||||
"docx/unused_anchors.docx"
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
[ Para
|
||||
[ Str "This"
|
||||
, Space
|
||||
, Str "is"
|
||||
, Space
|
||||
, Str "some"
|
||||
, Space
|
||||
, Str "sample"
|
||||
, Space
|
||||
, Str "content"
|
||||
, Space
|
||||
, Str "that"
|
||||
, Space
|
||||
, Str "will"
|
||||
, Space
|
||||
, Str "be"
|
||||
, Space
|
||||
, Str "wrapped"
|
||||
, Space
|
||||
, Str "inside"
|
||||
, Space
|
||||
, Str "a"
|
||||
, Space
|
||||
, Str "customXml"
|
||||
, Space
|
||||
, Str "element"
|
||||
, Space
|
||||
, Str "in"
|
||||
, Space
|
||||
, Str "the"
|
||||
, Space
|
||||
, Str "OpenXML"
|
||||
, Space
|
||||
, Str "structure."
|
||||
]
|
||||
]
|
||||
Reference in new issue
Block a user