git.iko.soy/typeable/pandoc
on master help sign in
DocBook reader: Fix bug with entities in mathphrase element.
3bf5362John MacFarlane
src/Text/Pandoc/Readers/DocBook.hs+2−4
@@ -1109,12 +1109,10 @@ equation e constructor =
1109 $ filterChildren childPredicate e
1109 $ filterChildren childPredicate e
1110 )
1110 )
1111
1111
1112−-- | Get the actual text stored in a verbatim CData block. 'showContent'
1112+-- | Get the actual text stored in a CData block. 'showContent'
1113-- returns the text still surrounded by the [[CDATA]] tags.
1113-- returns the text still surrounded by the [[CDATA]] tags.
1114−--
1115−-- Returns 'showContent' if this is not a verbatim CData
1116showVerbatimCData :: Content -> String
1114showVerbatimCData :: Content -> String
1117−showVerbatimCData (Text (CData CDataVerbatim d _)) = d
1115+showVerbatimCData (Text (CData _ d _)) = d
1118showVerbatimCData c = showContent c
1116showVerbatimCData c = showContent c
1119
1117
1120-- | Set the prefix of a name to 'Nothing'
1118-- | Set the prefix of a name to 'Nothing'
test/command/5885.mdnew file+20
@@ -0,0 +1,20 @@
1+```
2+% pandoc -f docbook -t latex
3+<equation>
4+ <mathphrase>
5+ J(x, y) = \left\{ \begin{array}{ll}
6+ 0 &amp; \text{if $I(x, y) &lt; t$} \\
7+ 1 &amp; \text{if $I(x, y) \ge t$}
8+ \end{array}
9+ \right.
10+ </mathphrase>
11+</equation>
12+^D
13+\[
14+ J(x, y) = \left\{ \begin{array}{ll}
15+ 0 & \text{if $I(x, y) < t$} \\
16+ 1 & \text{if $I(x, y) \ge t$}
17+ \end{array}
18+ \right.
19+ \]
20+```