Commit graph

7268 commits

Author SHA1 Message Date
John MacFarlane
afd986d808 Updated man page. 2016-07-14 22:57:58 -07:00
John MacFarlane
3d6e32bba1 Fixed duplicate reference in README. 2016-07-14 22:57:58 -07:00
Jesse Rosenthal
f529fc17ef Docx Writer: Use actual creation time as doc prop
Previously, we had used the user-supplied date, if available, for Word's
document creation metadata. This could lead to weird results, as in
cases where the user post-dates a document (so the modification might be
prior to the creation). Here we use the actual computer time to set the
document creation.
2016-07-14 17:02:30 -04:00
Jesse Rosenthal
e8e02f1220 Shared: improve year sanity check in normalizeDate
Previously we parsed a list of dates, took the first one, and then
tested its year range. That meant that if the first one failed, we
returned nothing, regardless of what the others did. Now we test for
sanity before running `msum` over the list of Maybe values. Anything
failing the test will be Nothing, so will not be a candidate.
2016-07-14 17:02:30 -04:00
Jesse Rosenthal
bbfcd50fb1 Shared: normalizeDate should reject illegal years.
We only allow years between 1601 and 9999, inclusive. The ISO 8601
actually says that years are supposed to start with 1583, but MS Word
only allows 1601-9999. This should stop corrupted word files if the date
is out of that range, or is parsed incorrectly.
2016-07-14 17:02:30 -04:00
Jesse Rosenthal
4816facee4 Shared: Add further formats for normalizeDate
We want to avoid illegal dates -- in particular years with greater than
four digits. We attempt to parse series of digits first as `%Y%m%d`, then
`%Y%m`, and finally `%Y`.
2016-07-14 17:02:30 -04:00
John MacFarlane
8248dde2b7 Added resolver clause to stack.lts6.yaml. 2016-07-14 10:52:01 -07:00
John MacFarlane
7826cc2a20 Added winpkg target to Makefile.
This downloads the windows package from appveyor and signs
it using the key.

This way we needn't mess with a Windows VM to build the package.
2016-07-14 10:29:46 -07:00
John MacFarlane
bbd7b533ae make_oxs_package.sh - use OSX env variable. 2016-07-14 10:29:34 -07:00
John MacFarlane
d5c3551276 Version to 1.17.2. 2016-07-14 10:26:00 -07:00
John MacFarlane
0b0a0e730f Removed some redundant class constraints. 2016-07-14 08:54:06 -07:00
John MacFarlane
3d86228c5b Fixed lts6 travis build. 2016-07-14 08:46:56 -07:00
John MacFarlane
06a3e6a03f Merge pull request #3019 from tarleb/org-verbatim-fix
Org reader: fix parsing of verbatim inlines
2016-07-14 08:43:39 -07:00
John MacFarlane
00b11bcbcf Fixed exponential parsing bug in textile reader.
Closes #3020.
2016-07-14 08:42:38 -07:00
Albert Krewinkel
529146decf Org reader: fix parsing of verbatim inlines
Org rules for allowed characters before or after markup chars were not
checked for verbatim text.  This resultet in wrong parsing outcomes of
if the verbatim text contained e.g. space enclosed markup characters as
part of the text (`=is_substr = True=`).  Forcing the parser to update
the positions of allowed/forbidden markup border characters fixes this.

This fixes #3016.
2016-07-14 13:33:25 +02:00
John MacFarlane
106786ef1b stack.yaml - use ghc 8.01 and nightly. 2016-07-13 23:03:08 -07:00
John MacFarlane
418ad5cc81 Allow QuickCheck 2.9. 2016-07-11 08:34:35 +01:00
John MacFarlane
e2659a46db Merge pull request #3014 from tarleb/org-writer-div
Org writer: improve Div handling
2016-07-05 12:46:13 -07:00
Albert Krewinkel
5378b7c5bd
Org writer: improve Div handling
Div blocks handling is changed to make the output look more like
idiomatic org mode:

  - Div-wrapped content is output as-is if the div's attribute is the
    null attribute.
  - Div containers with an id but neither classes nor key-value pairs
    are unwrapped and the id is added as an anchor.
  - Divs with classes associated with greater block elements are
    wrapped in a `#+BEGIN`...`#+END` block.
  - The old behavior for Divs with more complex attributes is kept.
2016-07-05 11:49:45 +02:00
John MacFarlane
6ea8ff19c3 Added http-client dependencies to stack.yaml files. 2016-07-04 10:24:28 -07:00
John MacFarlane
374614aaf7 Depend on http-client 0.5, http-client-tls 0.3 2016-07-04 10:23:37 -07:00
John MacFarlane
46f3deb248 Merge pull request #3012 from tarleb/org-drop-ugly-pragma
Org reader: replace ugly code with view pattern
2016-07-04 10:03:24 -07:00
Albert Krewinkel
f417fecf5f
Org reader: replace ugly code with view pattern
Some less-than-smart code required a pragma switching of overlapping
pattern warnings in order to compile seamlessly.  Using view patterns
makes the code easier to read and also doesn't require overlapping
pattern checks to be disabled.
2016-07-04 11:20:05 +02:00
John MacFarlane
e548b8df07 Merge pull request #3010 from tarleb/org-header-tree
Org reader: support archived trees, headline levels export setting
2016-07-03 22:57:22 -07:00
John MacFarlane
4099b2dca4 Odt reader: Removed redundant Monoid constraints. 2016-07-03 22:47:32 -07:00
John MacFarlane
b203a31ba7 Fix warning for parseURl import. 2016-07-03 22:26:08 -07:00
John MacFarlane
261c3af053 CPP workaround for deprecation of parseUrl in http-client. 2016-07-03 21:29:47 -07:00
Albert Krewinkel
5ffa4abf72
Org reader: support headline levels export setting
The depths of headlines can be modified using the `H` option.  Deeper
headlines will be converted to lists.
2016-07-03 23:28:45 +02:00
John MacFarlane
1dbbb2f41a Travis: don't test on lts-5. 2016-07-03 13:28:28 -07:00
John MacFarlane
40caf516aa Allow 'standout' as a beamer frame option.
## Slide title {.standout}

Closes #3007.
2016-07-03 11:56:03 -07:00
John MacFarlane
44ce21e134 stack.yaml: use 6.5 resolver. 2016-07-03 11:54:11 -07:00
Albert Krewinkel
c1f6bd2640
Org reader: put export setting parser into module
Export option parsing is distinct enough from general block parsing to
justify putting it into a separate module.
2016-07-02 13:14:09 +02:00
John MacFarlane
e0cc9e4463 LaTeX reader: strip off double quotes around image source if present.
Avoids interpreting these as part of the literal filename.
See #2825.
2016-07-01 15:47:42 -07:00
John MacFarlane
7e712abfa6 LaTeX writer: don't URI-escape image source.
Usually this is a local file, and replacing spaces with `%20`
ruins things.  Closes #2825.
2016-07-01 15:41:33 -07:00
John MacFarlane
da38bebbdc beamer, latex templates: pass biblatexoptions directly in package load.
This allows runtime optinos to be used.  Fixes jgm/pandoc-citeproc#201
2016-07-01 15:13:46 -07:00
Albert Krewinkel
c4cf6d237f
Org reader: support archived trees export options
Handling of archived trees can be modified using the `arch` option.
Archived trees are either dropped, exported completely, or collapsed to
include just the header when the `arch` option is nil, non-nil, or
`headline`, respectively.
2016-07-01 23:05:33 +02:00
Albert Krewinkel
1ebaf6de11
Org reader: refactor comment tree handling
Comment trees were handled after parsing, as pattern matching on lists
is easier than matching on sequences.  The new method of reading
documents as trees allows for more elegant subtree removal.
2016-07-01 23:05:32 +02:00
Albert Krewinkel
17484ed01a
Org reader: parse as headlines, convert to blocks
Emacs org-mode is based on outline-mode, which treats documents as trees
with headlines are nodes.  The reader is refactored to parse into a
similar tree structure.  This simplifies transformations acting on
document (sub-)trees.
2016-07-01 23:05:32 +02:00
Albert Krewinkel
2f8d6755f4
Org reader: improve tag and properties type safety
Specific newtype definitions are used to replace stringly typing of tags
and properties.  Type safety is increased while readability is improved.
2016-07-01 23:05:32 +02:00
John MacFarlane
b3382cf377 ZimWiki writer: removed commented out code that confused Haddock.
See https://travis-ci.org/jgm/pandoc/jobs/141542247
2016-07-01 10:39:32 -07:00
Alex Ivkin
7fdcd9a6e2 Added ZimWiki format to documentation and cabal description. 2016-07-01 00:12:25 -07:00
Alex Ivkin
a73c95f61d Added Zim Wiki writer, template and tests. 2016-06-30 23:59:43 -07:00
Jesse Rosenthal
b103f829f0 Docx writer: set paragraph to FirstPara after display math
We treat display math like block quotes, and apply FirstParagraph style
to paragraphs that follow them. These can be styled as the user
wishes. (But, when the user is using indentation, this allows for
paragraphs to continue after display math without indentation.)
2016-07-01 01:14:16 -04:00
Jesse Rosenthal
2c62f0e122 Writers: treat SoftBreak as space for stripping
In Writers.Shared, we strip leading and trailing spaces for display
math. Since SoftBreak's are treated as spaces, we should strip those
too.
2016-07-01 00:52:52 -04:00
John MacFarlane
3429fa6438 LaTeX reader: fixed \cite so it is a NormalCitation not AuthorInText. 2016-06-29 07:59:00 -07:00
John MacFarlane
a349814665 Merge pull request #3001 from tarleb/org-figure-label
Org reader: support figure labels
2016-06-26 17:51:51 -07:00
John MacFarlane
7ded9d4af0 Include table of contents in README.html in Windows package. 2016-06-26 17:24:15 -07:00
Albert Krewinkel
0f3f5ce1a1 Org reader: support figure labels
Figure labels given as `#+LABEL: thelabel` are used as the ID of the
respective image.  This allows e.g. the LaTeX to add proper `\label`
markup.

This fixes half of #2496 and #2999.
2016-06-26 20:42:22 +02:00
John MacFarlane
38c97320ef Textile reader: Fix overly aggressive interpretation as images.
Spaces are not allowed in the image URL in textile.

Closes #2998.
2016-06-25 14:04:47 -07:00
John MacFarlane
0f9c6c4db0 Added secnumdepth variable to LaTeX template.
Closes #2920.
2016-06-25 13:13:09 -07:00