Commit graph

13191 commits

Author SHA1 Message Date
John MacFarlane
8ec3f6fc46 Docbook writer: Add personname element to docbook author.
Closes #6244.
2020-04-01 09:05:13 -07:00
Felix Yan
f6615ad85e
Allow hslua 1.1 (#6243)
Builds fine and all tests pass.
2020-04-01 08:52:14 -07:00
Levi Gruspe
e04ac2a093 Fix description of BulletList Lua type
Change description of BulletList parameter from 'List of Blocks' to 'List of List of Blocks'.
2020-04-01 13:16:41 +02:00
John MacFarlane
247d8e8001 Markdown writer: ensure consistent padding for pipe tables.
Previously there was no space between text and bar in right-aligned
table cells.

This commit also ensures space on both sides for centered cells.

Closes #6240.
2020-03-31 22:34:00 -07:00
Albert Krewinkel
7df0710094
Jira reader: use span with class underline for inserted text
Jira text which is marked as `+inserted+` is converted into pandoc's
default representation for underlined text: a span with class
`underline`. Previously, the span was marked with the non-standard class
`inserted`.

Closes: #6237
2020-03-31 10:04:55 +02:00
Albert Krewinkel
ff9be6b384
Jira writer: convert spans with class underline to inserted text
Spans with class `underline` as converted into Jira text marked as
`+inserted+`, i.e. surrounded by plus-signs.
2020-03-31 09:57:59 +02:00
Albert Krewinkel
9a42bec7fc
Jira writer tests: update image in test/writer.jira 2020-03-31 08:18:41 +02:00
Albert Krewinkel
e8e6c82aae
Jira writer: add image attributes
Image attributes are added to the output as image parameters. If the
image has a class "thumbnail", then a thumbnail image is generated; all
other attributes are discarded in this case.

Closes: #6234
2020-03-30 22:21:29 +02:00
Albert Krewinkel
69a3fa5708
Jira reader: retain image attributes
Jira images attributes as in `!image.jpg|align=right!` are retained as
key-value pairs. Thumbnail images, such as `!example.gif|thumbnail!`,
are marked by a `thumbnail` class in their attributes.

Related to #6234.
2020-03-30 22:03:52 +02:00
Albert Krewinkel
0069773364
Jira reader: read (?) icon as "small questionmark" character
Closes: #6236
2020-03-30 21:34:25 +02:00
Joseph C. Sible
4f41ac3269
Fix #6228 (#6230)
UUID: Remove `getUUID`, fix `getRandomUUID` and make it polymorphic in PandocMonad.
2020-03-30 12:03:29 -07:00
Joseph C. Sible
a465e2c059
Clean up and simplify Text.Pandoc.Readers.Docx (#6225)
* Simplify resolveDependentRunStyle

* Simplify runToInlines

* Simplify isAnchorSpan

* Simplify parStyleToTransform

* Only call getStyleName once

* Simplify ils''

* Use case matching to simplify bodyPartToBlocks

* Simplify key expiration
2020-03-29 21:24:42 -07:00
Joseph C. Sible
693159bf38
Clean up and simplify Text.Pandoc.Writers.Docx (#6229)
* Use <|> to simplify the Semigroup instance

* Use map instead of reimplementing it

* Simplify isValidChar

* Remove an unnecessary nested do block

* Simplify pgContentWidth

* Simplify addLang

* Simplify newStyles

* Avoid an unnecessary fmap in headerFooterEntries

* Remove unnecessary monadicity from mkNumbering and mkAbstractNum

* Use randomRs instead of constantly messing with the RNG state

* Lift common functions out of ifs

* Hoist not

* Clarify withTextPropM and withParaPropM
2020-03-29 21:18:31 -07:00
Joseph C. Sible
377efd0ce7
Clean up some fmaps (#6226)
* Avoid fmapping when we're just binding right after anyway

* Clean up unnecessary fmaps in the LaTeX reader
2020-03-29 21:11:05 -07:00
Joseph C. Sible
40fd20d43f
Split the RNG so they don't end up equal again after 1 call to next (#6227) 2020-03-29 21:10:50 -07:00
John MacFarlane
c12bf49e59 Docx reader: better error messages.
Distinguish between docx parsing and docx container
unpacking errors.
2020-03-29 10:59:18 -07:00
Joseph C. Sible
7233a7a932
More cleanup (#6209)
* Simplify by collapsing a do block into a single <$>
* Remove an unnecessary variable: `all` takes any Foldable, so only blocksToInlines needs toList.
2020-03-28 22:48:47 -07:00
Joseph C. Sible
c812ff7e89
Simplify fixAuthors (#6223) 2020-03-28 22:47:24 -07:00
Albert Krewinkel
09a5a1f447
Jira reader: fix multiple parsing problems
Multiple parsing problems are resolved, including issues with empty
table cells, faulty recognition of closing emphasis characters, and
parsing of image attributes.

Fixes: #6212
Fixes: #6219
Fixes: #6220
2020-03-28 15:57:00 +01:00
John MacFarlane
e1d302b3ef Bump QuickCheck upper bound. 2020-03-27 22:23:13 -07:00
Mike Tzou
349b5fd2ed
trypandoc: Add standalone option to the command text (#6210)
* trypandoc: Add standalone option to the command text

* trypandoc: Update 3rd party libraries

Those links are taken as-is from the library website.
2020-03-25 08:48:48 -07:00
John MacFarlane
1b0fec1f30 Add to AUTHORS.md 2020-03-23 21:50:19 -07:00
John MacFarlane
adcce0c230 Tweaks to changelog. 2020-03-23 21:16:24 -07:00
John MacFarlane
8730eea930 Small changes to README.md. 2020-03-23 16:50:07 -07:00
John MacFarlane
42fe30a9ee Update manual date and man paeg. 2020-03-23 16:43:31 -07:00
John MacFarlane
b5a3c3292a Bump version to 2.9.1. 2020-03-23 14:38:58 -07:00
John MacFarlane
e0d6466049 Provisionally update changelog. 2020-03-23 14:38:23 -07:00
Albert Krewinkel
f2b337768e
Finer grained imports of Text.Pandoc.Class submodules (#6203)
This should speed-up recompilation after changes in `Text.Pandoc.Class`,
as the number of modules affected by a change will be smaller in
general. It also offers faster insights into the parts of `T.P.Class`
used within a module.
2020-03-22 12:28:45 -07:00
John MacFarlane
22bf3d6727 Small changes to macos release candidate Makefile. 2020-03-22 11:13:20 -07:00
John MacFarlane
36cdaa4845 Fixes to 'notarize' target to preserve hardened runtime. 2020-03-22 11:00:31 -07:00
John MacFarlane
c173668938 macos/Makefile - add notarize target. 2020-03-22 10:50:11 -07:00
John MacFarlane
9b00526e44 Actions/release-candidate/macos: set up to create package locally.
We need to sign the binaries before inserting them into the
package, so this should be done locally.
2020-03-22 10:30:45 -07:00
John MacFarlane
4d3ade0347 Add new distribution-creating Makefile to macos directory. 2020-03-22 10:26:20 -07:00
John MacFarlane
667af847a2 Remove old script to create macos package.
We now do this in CI.
2020-03-22 10:26:20 -07:00
Albert Krewinkel
2a042ff711
Text.Pandoc.Class: extract submodules PandocIO, PandocPure 2020-03-22 14:59:38 +01:00
Albert Krewinkel
66375f3fc4
Class: fix missing import when data files are not embedded 2020-03-21 16:26:24 +01:00
Fabien Schurter
5d88396dd4
Make MANUAL more explicit about NBSP handling by all_symbols_escapable (#6201)
Fixes #6154.
2020-03-20 17:15:00 -07:00
John MacFarlane
7601953205 Add to html5 attributes.
Add: allow, autocapitalize, decoding, enterkeyhint,
imagesizes, imagesrcset, loading.
2020-03-19 16:10:51 -07:00
Albert Krewinkel
44f8c2725e
Jira reader: fix parsing of tables without preceding blankline
A bug was fixed which caused faulty parsing if a table was not preceded
by a newline and the first table cell had no space after the initial `|`
characters.

Fixes: #6198
2020-03-19 21:27:35 +01:00
Albert Krewinkel
81d46435f6
Jira reader: fix parsing of strikeout, emphasis
A bug was fixed which caused non-emphasized text containing digits and/or
non-special symbols (like dots) to sometimes be parsed incorrectly.

Fixes: #6196
2020-03-18 21:32:05 +01:00
Mike Tzou
525edb86c0
trypandoc: Add checkbox for standalone option (#6189) 2020-03-16 10:01:50 -07:00
John MacFarlane
004907f4f2 make changes_github: use details tag to make changelog collapsible. 2020-03-15 11:23:55 -07:00
John MacFarlane
e23554cec1 Update filter code in doc/filters.md...
so it works with latest pandoc. Closes #6185.
2020-03-15 09:59:44 -07:00
Mike Tzou
225e7210f0
Improvements to trypandoc (#6188)
* Use "strict mode" for javascript code

* Fetch resources over https

Otherwise it will depend on the protocol of the webpage served which is
a bad idea.

* Remove unnecessary attributes

Those attributes are not required in HTML5.
2020-03-15 09:46:53 -07:00
Albert Krewinkel
a5fa55969f
Use implicit Prelude (#6187)
* Use implicit Prelude

The previous behavior was introduced as a fix for #4464. It seems that
this change alone did not fix the issue, and `stack ghci` and `cabal
repl` only work with GHC 8.4.1 or newer, as no custom Prelude is loaded
for these versions. Given this, it seems cleaner to revert to the
implicit Prelude.

* PandocMonad: remove outdated check for base version

Only base versions 4.9 and later are supported, the check for
`MIN_VERSION_base(4,8,0)` is therefore unnecessary.

* Always use custom prelude

Previously, the custom prelude was used only with older GHC versions, as
a workaround for problems with ghci. The ghci problems are resolved by
replacing package `base` with `base-noprelude`, allowing for consistent
use of the custom prelude across all GHC versions.
2020-03-15 09:45:44 -07:00
Albert Krewinkel
76705dfeb0
PandocMonad: remove outdated check for base version
Only base versions 4.9 and later are supported, the check for
`MIN_VERSION_base(4,8,0)` is therefore unnecessary.
2020-03-15 09:55:34 +01:00
Albert Krewinkel
ec49643d64
Subdivide Text.Pandoc.Class into small modules (#6106)
* Extract CommonState into submodule

* Extract PandocMonad into submodule

* PandocMonad: ensure all functions have Haddock documentation
2020-03-14 20:49:36 -07:00
Albert Krewinkel
11b5f1e40b
Update copyright year (#6186)
* Update copyright year

* Copyright: add notes for Lua and Jira modules
2020-03-13 09:52:47 -07:00
Albert Krewinkel
9ffa8100d7
tools: delete Lua documentation helper cruft
The tools were useful to generate documentation from the Lua sources.
However, most Lua functions are defined in Haskell, and the even
documentation of functions written in Lua has been updated manually for
quite a while now. The unused helper scripts, which have bit-rot to the
point that they now produce broken links, are therefore removed.
2020-03-13 14:22:23 +01:00
Albert Krewinkel
24da280000
Lua marshalling: Remove unused language extensions 2020-03-13 09:52:28 +01:00