Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JATS: correct suppress attribute #10350

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Readers/JATS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ parseBlock (Elem e) = do
Just t -> read $ T.unpack t
Nothing -> if isBook || n == 0 then n + 1 else n
headerText <- case filterChild (named "title") e of
Just t -> case maybeAttrValue "supress" t of
Just t -> case maybeAttrValue "suppress" t of
Just s -> if s == "no"
then getInlines t
else return mempty
Expand Down
6 changes: 3 additions & 3 deletions test/command/bits-title-supress.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
```
% pandoc -f jats -t native
<sec>
<title supress="no">The European Parliament</title>
<title suppress="no">The European Parliament</title>
<p>Members of the European Parliament (MEPs) are directly elected by EU citizens.</p>
</sec>
^D
Expand Down Expand Up @@ -89,7 +89,7 @@
```
% pandoc -f jats -t native
<sec>
<title supress="yes">The European Parliament</title>
<title suppress="yes">The European Parliament</title>
<p>Members of the European Parliament (MEPs) are directly elected by EU citizens.</p>
</sec>
^D
Expand Down Expand Up @@ -119,4 +119,4 @@
, Str "citizens."
]
]
```
```