Commit graph

5406 commits

Author SHA1 Message Date
Jesse Rosenthal
435b1829b1 Powepoint writer: Simplify speaker notes
We now pull the filtered blocks and speaker notes out at the top of
the `blocksToSlide` function, and then make SpeakerNotes into a
parameter of the `blocksToSlide'` subfunction. The output is the same,
but the logic should be easier to follow now.
2018-03-23 14:22:35 -04:00
Jesse Rosenthal
3b7611a7c7 Powerpoint writer: change notes state to a simpler per-slide value
We used to keep a map of the slideId-to-notes for each slide. Since we
now extract them at the slide level, this is overcomplicated, and we
can just extract them before converting a slide and then clear the
state after.
2018-03-23 13:58:22 -04:00
Jesse Rosenthal
59f3997069 Powerpoint writer: Remove Maybe from SpeakerNotes in Slide.
Previously, we had treated it as a `Maybe`. But there is no difference
between not having speaker notes and having empty speaker notes. So we
make the SpeakerNotes newtype into a monoid, and test for memptiness
instead of testing for Just/Nothing.
2018-03-23 13:00:30 -04:00
John MacFarlane
e190912302 Parsing: Fix romanNumeral parser.
We previously accepted 'DDC' as 1100.  Closes #4480.
2018-03-21 16:49:55 -07:00
Alexander Krotov
6f50733691 Muse writer: don't align ordered list items
It leads to problems with round-trip test,
because aligned line blocks can't be read back.
2018-03-21 17:33:27 +03:00
Jesse Rosenthal
ab184a519c Powerpoint writer: handle speaker notes earlier in the conversion process
Internal change: We were getting bad results with the empty text box
created by the conversion of notes into an empty paragraph. So we now
convert the notes at the `blocksToSlide` stage, by `walkM`ing a
function over the blocks that returns `()`, and then filters the notes
out. This avoids the need to have a return value for speaker notes,
and thus avoids the empty TextBox.

Together with the previous commit (256f14c5a), closes #4477.
2018-03-21 10:07:07 -04:00
Jesse Rosenthal
cb1ee07c98 Powerpoint writer: Keep notes with related blocks
Some blocks automatically split slides (imgs, tables, `column`
divs). We assume that any speaker notes immediately following these
are connected to these elements, and keep them with the related
blocks, splitting after them.
2018-03-21 10:07:07 -04:00
Alexander Krotov
81afcdfaf8 Muse writer: escape "]" in image title 2018-03-20 15:01:53 +03:00
Alexander Krotov
bc0025d944 Muse writer: remove key-value pairs from attributes before normalization 2018-03-20 14:51:39 +03:00
Alexander Krotov
268c73c873 Muse writer: escape ";" to avoid accidental comments 2018-03-20 12:16:34 +03:00
Alexander Krotov
d63bba3066 Muse writer: escape "]" brackets in URLs as "%5D" 2018-03-20 12:16:34 +03:00
John MacFarlane
3d21c184d4 Ms writer: don't escape hyphens.
Previously we escaped hyphens as `\-`, but that's a minus sign.
Closes #4467.

Updated changelog.
2018-03-18 14:52:03 -07:00
John MacFarlane
6fdf0c4d9d Removed unnecessary import. 2018-03-18 12:40:05 -07:00
Mauro Bieg
ec47079d3e EPUB writer: remove notes from TOC in nav.xhtml (#4463)
fixes #4453
2018-03-18 11:34:34 -07:00
John MacFarlane
937bec95a9 Removed old-locale flag and Text.Pandoc.Compat.Time.
This is no longer necessary since we no longer support ghc 7.8.
2018-03-18 11:24:29 -07:00
John MacFarlane
7e389cb3db Use NoImplicitPrelude and explicitly import Prelude.
This seems to be necessary if we are to use our custom Prelude
with ghci.

Closes #4464.
2018-03-18 10:46:28 -07:00
John MacFarlane
dfa1dc164a hlint fixes. 2018-03-17 22:00:55 -07:00
Marc Schreiber
155a2ac039 Add support to parse unit string of \SI command (closes #4296). 2018-03-17 20:59:20 -07:00
John MacFarlane
fef484c4d0 Fixed typo introduced in merge. 2018-03-17 20:41:11 -07:00
Francesco Occhipinti
ba965d1736 RST writer: filter out empty inline containers (#4434).
There is nothing in RST that corresponds to e.g. `Emph []`, so we just filter out elements like this.
2018-03-17 20:39:26 -07:00
Francesco Occhipinti
e5845f33ad Don't wrap lines in grid tables when --wrap=none (#4320)
* Annotate gridTable code with comments and abstract small functions
* Don't wrap lines in tables when `--wrap=none`.  Instead, expand cells, even if
   it results in cells that don't respect relative widths or surpass page column width.
* This change affects RST, Markdown, and Haddock writers.
2018-03-17 20:31:43 -07:00
Francesco Occhipinti
90a705c8af RST writer: separate inline transformation logic from writing logic (#4438)
This is to help enable solutions  solutions to #4434 and #4368.
2018-03-17 20:17:55 -07:00
Francesco Occhipinti
65cc909fde RST writer: strip whitespace within inlines, closes #4327 (#4329)
+ Whitespace is ignored at the beginning and end of emphasis, as per
  <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup>.
+ Export `stripLeadingTrailingSpace` from `Text.Pandoc.Writers.Shared`.
2018-03-17 19:21:27 -07:00
John MacFarlane
605545e024 Work around Monoid/Semigroup-related compiler errors GHC 7.10. 2018-03-17 14:25:05 -07:00
John MacFarlane
2eba15c181 More CSS around DocTable in Haddock reader. 2018-03-17 08:18:15 -07:00
John MacFarlane
fad8d0d67f Allow earlier versions of haddock-library, use CPP. 2018-03-16 23:18:42 -07:00
John MacFarlane
be12ae3bca Better table handling for Haddock.
In the reader, we use the new Table type in Haddock.
Note that tables with col/rowspans will not translate
well into Pandoc.

In the writer, we now render tables always as grid tables,
since Haddock supports these.
2018-03-16 22:38:34 -07:00
John MacFarlane
f0b6e0ee49 Monoid/Semiground cleanup relying on custom Prelude. 2018-03-16 12:17:58 -07:00
John MacFarlane
0b5712e69b Class: Semigroup instance for FileTree with base >= 4.9. 2018-03-16 08:23:34 -07:00
John MacFarlane
8360f9dedf Translations: Semigroup instance for Translations with base >= 4.9. 2018-03-16 08:21:52 -07:00
John MacFarlane
0cbb811f3d Extensions: Semigroup instance for Extensions with base >= 4.9. 2018-03-16 08:20:12 -07:00
John MacFarlane
2240c4d80b Semigroup instance for Styles in T.P.Readers.Odt.StyleReader. 2018-03-16 08:17:59 -07:00
John MacFarlane
94d64a63f2 Removed redundant import. 2018-03-16 08:15:09 -07:00
John MacFarlane
07e0981316 Pretty: Semigroup instance for Doc with base >= 4.9. 2018-03-16 08:12:33 -07:00
John MacFarlane
ec1e2c87b7 Semigroup instance for MediaBag with base >= 4.9. 2018-03-16 08:11:10 -07:00
John MacFarlane
df71628d26 Remove redundant import. 2018-03-15 12:23:33 -07:00
John MacFarlane
4eb71693e5 Remove redundant import. 2018-03-15 09:54:02 -07:00
John MacFarlane
b76c0e6a4a RST reader: Allow unicode bullet characters.
Closes #4454.
2018-03-14 17:33:00 -07:00
John MacFarlane
1b37e3b3c0 Require pandoc-types 1.17.4.
And a few tweaks related to the Semigroups/Monoid change.

Closes #4448.
2018-03-13 23:23:04 -07:00
Mauro Bieg
bcfc3916e9 DokuWiki writer: rewrite backSlashLineBreaks (#4445)
Rewrite for efficiency.
2018-03-13 21:41:23 -07:00
Jesse Rosenthal
b3fe95d721 Docx reader: Parse nested smart tags.
Make unwrapSDT into a general `unwrap` function that can unwrap both
nested SDT tags and smartTags. This makes the SmartTags constructor in
the Docx type unnecessary, so we remove it.

Closes #4446
2018-03-13 22:15:11 -04:00
John MacFarlane
17725a0661 Beamer: put hyperlink after \begin{frame}.
and not in the title.  If it's in the title, then we get
a titlebar on slides with the `plain` attribute, when
the id is non-null.  This fixes a regression from 1.9.x.

Closes #4307.
2018-03-13 10:03:51 -07:00
Alexander Krotov
f7226a57af Docx reader: remove unused docxWarnings 2018-03-12 15:49:31 +03:00
Alexander Krotov
bf16a9c78a Muse reader: make parseBlocks similar to parseBlocksTill 2018-03-12 14:51:44 +03:00
Alexander Krotov
c3fbc492c8 Muse reader: require closing tag to have the same indentation as opening 2018-03-12 14:24:50 +03:00
Alexander Krotov
f0a029ac51 Muse reader: do not reparse blocks inside unclosed block tag
Fixes #4425
2018-03-12 13:44:27 +03:00
Mauro Bieg
15f700d8ed html2pdf: inject base tag wih current working directory (#4443)
fixes #4413
2018-03-11 18:21:15 -07:00
Mauro Bieg
a0da1e2723 Dokuwiki writer: fix LineBreaks in Tables (#4444)
fixes #4313
2018-03-11 18:20:36 -07:00
Alexander Krotov
19fd98e452 Muse writer: support spans with anchors 2018-03-12 01:47:20 +03:00
Alexander Krotov
9bcd090848 Muse reader: parse <class> tag
<class> tag is supported by Emacs Muse
2018-03-10 07:27:41 +03:00