Docx reader: Parse hyperlinks in instrText tags

This was a form of hyperlink found in older versions of word. The
changes introduced for this, though, create a framework for parsing
further fields in MS Word (see the spec, ECMA-376-1:2016, §17.16.5,
for more on these fields).

Closes #3389 and #4266.
This commit is contained in:
Jesse Rosenthal
2018-01-16 13:22:02 -05:00
parent ae8c0cdba8
commit 95d602d3b7
+4 -2
View File
@@ -446,8 +446,10 @@ parPartToInlines' (PlainOMath exps) =
return $ math $ writeTeX exps
parPartToInlines' (SmartTag runs) = do
smushInlines <$> mapM runToInlines runs
parPartToInlines' (Field _ runs) = do
smushInlines <$> mapM runToInlines runs
parPartToInlines' (Field info runs) = do
case info of
HyperlinkField url -> parPartToInlines' $ ExternalHyperLink url runs
UnknownField -> smushInlines <$> mapM runToInlines runs
parPartToInlines' NullParPart = return mempty
isAnchorSpan :: Inline -> Bool