diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2022-01-10 11:47:55 -0800 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2022-01-10 11:47:55 -0800 |
| commit | a25e79b5bef9a55c076351d1321675e26513f8ac (patch) | |
| tree | b3180a8111fa4c69993ce7943704b6fe1ad4885e /src/Text | |
| parent | 7bf119168658627dbddcc6753b79a5f921519782 (diff) | |
DocBook reader: Collapse internal spaces in literal...
and other similar tags. This seems to accord with what
the docbook toolchain does.
Closes #7821.
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index a0801124f..6fe493e4e 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -1241,7 +1241,9 @@ parseInline (Elem e) = let classes' = case attrValue "language" e of "" -> [] l -> [l] - return $ codeWith (attrValue "id" e,classes',[]) $ strContentRecursive e + return $ codeWith (attrValue "id" e,classes',[]) $ + T.unwords $ T.words $ strContentRecursive e + -- collapse internal spaces/newlines, see #7821 simpleList = mconcat . intersperse (str "," <> space) <$> mapM getInlines (filterChildren (named "member") e) segmentedList = do |
