DocBook reader: Fix bug with entities in mathphrase element.
Closes #5885.
This commit is contained in:
parent
b44a4c803e
commit
3bf5362898
2 changed files with 22 additions and 4 deletions
|
@ -1109,12 +1109,10 @@ equation e constructor =
|
||||||
$ filterChildren childPredicate e
|
$ filterChildren childPredicate e
|
||||||
)
|
)
|
||||||
|
|
||||||
-- | Get the actual text stored in a verbatim CData block. 'showContent'
|
-- | Get the actual text stored in a CData block. 'showContent'
|
||||||
-- returns the text still surrounded by the [[CDATA]] tags.
|
-- returns the text still surrounded by the [[CDATA]] tags.
|
||||||
--
|
|
||||||
-- Returns 'showContent' if this is not a verbatim CData
|
|
||||||
showVerbatimCData :: Content -> String
|
showVerbatimCData :: Content -> String
|
||||||
showVerbatimCData (Text (CData CDataVerbatim d _)) = d
|
showVerbatimCData (Text (CData _ d _)) = d
|
||||||
showVerbatimCData c = showContent c
|
showVerbatimCData c = showContent c
|
||||||
|
|
||||||
-- | Set the prefix of a name to 'Nothing'
|
-- | Set the prefix of a name to 'Nothing'
|
||||||
|
|
20
test/command/5885.md
Normal file
20
test/command/5885.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
```
|
||||||
|
% pandoc -f docbook -t latex
|
||||||
|
<equation>
|
||||||
|
<mathphrase>
|
||||||
|
J(x, y) = \left\{ \begin{array}{ll}
|
||||||
|
0 & \text{if $I(x, y) < t$} \\
|
||||||
|
1 & \text{if $I(x, y) \ge t$}
|
||||||
|
\end{array}
|
||||||
|
\right.
|
||||||
|
</mathphrase>
|
||||||
|
</equation>
|
||||||
|
^D
|
||||||
|
\[
|
||||||
|
J(x, y) = \left\{ \begin{array}{ll}
|
||||||
|
0 & \text{if $I(x, y) < t$} \\
|
||||||
|
1 & \text{if $I(x, y) \ge t$}
|
||||||
|
\end{array}
|
||||||
|
\right.
|
||||||
|
\]
|
||||||
|
```
|
Loading…
Add table
Reference in a new issue