mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
DocBook reader: support href on link...
even in a fragment. (We now just look for an `href` attribute without worrying about the namespace.) See #8437.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{- |
|
||||
@@ -1277,7 +1278,10 @@ parseInline (Elem e) =
|
||||
"ulink" -> innerInlines (link (attrValue "url" e) "")
|
||||
"link" -> do
|
||||
ils <- innerInlines id
|
||||
let href = case findAttr (QName "href" (Just "http://www.w3.org/1999/xlink") Nothing) e of
|
||||
let href = case findAttrBy
|
||||
(\case
|
||||
QName "href" _ _ -> True
|
||||
_ -> False) e of
|
||||
Just h -> h
|
||||
_ -> "#" <> attrValue "linkend" e
|
||||
let ils' = if ils == mempty then str href else ils
|
||||
|
||||
Reference in New Issue
Block a user