aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2020-04-13Add an option to disable certificate validation (#6156)Cédric Couralet6-2/+24
This commit adds the option `--no-check-certificate`, which disables certificate checking when resources are fetched by HTTP. Co-authored-by: Cécile Chemin <cecile.chemin@insee.fr> Co-authored-by: Juliette Fourcot <juliette.fourcot@insee.fr>
2020-04-12RST reader: handle "date::" directive.John MacFarlane1-1/+10
Closes #6276.
2020-04-11LaTeX writer: ensure that `-M csquotes` works even in fragment mode.John MacFarlane1-10/+11
Closes #6265.
2020-04-11HTML reader: support <bdo> (#6271)Tristan de Cacqueray1-0/+13
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo Closes #5794
2020-04-09Jira reader: improve icon conversionAlbert Krewinkel1-12/+12
Icons are now converted as follows: `(/)` to ✔, `(x)` to ❌, `(!)` to ❗, `(+)` to ➕, `(-)` to ➖, `(off)` to 🌙, and `(*)` to ☆. The new icons render well in most fonts. Furthermore, the UTF-8 characters all fit into 4-bytes. Closes: #6264
2020-04-07LaTeX reader: better handling of `\lettrine`.John MacFarlane1-1/+8
- SmallCaps instead of Span for the part after the initial capital. - Ensure that both arguments are parsed, so that in Markdown both are treated as raw LateX. (Closes #6258.)
2020-04-06Vimwiki reader: Add nested syntax highlighting (#6257)Vlad Hanciuta1-1/+5
Nested syntaxes are specified like this: {{{sql SELECT * FROM table }}} The preformatted code block parser has been extended to check if the first attribute of the block is not a `key=value` pair, and in that case it will be considered as a class. Closes #6256.
2020-04-04Jira: support citations, attachment links, and user linksAlbert Krewinkel2-4/+40
Closes: #6231 Closes: #6238 Closes: #6239
2020-04-02HTML reader: fix parsing unclosed th elements in a table.John MacFarlane1-0/+1
Closes #6247.
2020-04-01Docbook writer: Add personname element to docbook author.John MacFarlane1-1/+2
Closes #6244.
2020-03-31Markdown writer: ensure consistent padding for pipe tables.John MacFarlane1-2/+2
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-31Jira reader: use span with class `underline` for inserted textAlbert Krewinkel1-1/+1
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-31Jira writer: convert spans with class `underline` to inserted textAlbert Krewinkel1-1/+9
Spans with class `underline` as converted into Jira text marked as `+inserted+`, i.e. surrounded by plus-signs.
2020-03-30Jira writer: add image attributesAlbert Krewinkel1-1/+13
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-30Jira reader: retain image attributesAlbert Krewinkel1-1/+13
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-30Jira reader: read `(?)` icon as "small questionmark" characterAlbert Krewinkel1-1/+1
Closes: #6236
2020-03-30Fix #6228 (#6230)Joseph C. Sible2-7/+8
UUID: Remove `getUUID`, fix `getRandomUUID` and make it polymorphic in PandocMonad.
2020-03-29Clean up and simplify Text.Pandoc.Readers.Docx (#6225)Joseph C. Sible1-61/+43
* 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-29Clean up and simplify Text.Pandoc.Writers.Docx (#6229)Joseph C. Sible1-56/+48
* 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-29Clean up some fmaps (#6226)Joseph C. Sible7-22/+22
* Avoid fmapping when we're just binding right after anyway * Clean up unnecessary fmaps in the LaTeX reader
2020-03-29Split the RNG so they don't end up equal again after 1 call to next (#6227)Joseph C. Sible1-5/+5
2020-03-29Docx reader: better error messages.John MacFarlane1-8/+12
Distinguish between docx parsing and docx container unpacking errors.
2020-03-28More cleanup (#6209)Joseph C. Sible1-4/+3
* Simplify by collapsing a do block into a single <$> * Remove an unnecessary variable: `all` takes any Foldable, so only blocksToInlines needs toList.
2020-03-28Simplify fixAuthors (#6223)Joseph C. Sible1-6/+1
2020-03-22Finer grained imports of Text.Pandoc.Class submodules (#6203)Albert Krewinkel89-111/+120
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-22Text.Pandoc.Class: extract submodules PandocIO, PandocPureAlbert Krewinkel3-393/+446
2020-03-21Class: fix missing import when data files are not embeddedAlbert Krewinkel1-0/+3
2020-03-19Add to html5 attributes.John MacFarlane1-0/+7
Add: allow, autocapitalize, decoding, enterkeyhint, imagesizes, imagesrcset, loading.
2020-03-15Use implicit Prelude (#6187)Albert Krewinkel158-310/+2
* 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-15PandocMonad: remove outdated check for base versionAlbert Krewinkel1-6/+1
Only base versions 4.9 and later are supported, the check for `MIN_VERSION_base(4,8,0)` is therefore unnecessary.
2020-03-14Subdivide Text.Pandoc.Class into small modules (#6106)Albert Krewinkel3-695/+823
* Extract CommonState into submodule * Extract PandocMonad into submodule * PandocMonad: ensure all functions have Haddock documentation
2020-03-13Update copyright year (#6186)Albert Krewinkel135-148/+149
* Update copyright year * Copyright: add notes for Lua and Jira modules
2020-03-13Lua marshalling: Remove unused language extensionsAlbert Krewinkel4-8/+3
2020-03-13Jira reader: support colored inline text, indented listsAlbert Krewinkel1-0/+2
* Support for colored inlines has been added. * Lists are now allowed to be indented; i.e., lists are still recognized if list markers are preceded by spaces. Closes: #6183, #6184
2020-03-07Ms writer: fix definition lists so indent even when...John MacFarlane1-3/+4
paragraph indent is set to 0 (as is the default). Also ensure indent for display math that falls back to TeX.
2020-03-06Ms writer: use .QS/.QE instead of .RS/.RE for block quotes.John MacFarlane1-1/+1
2020-03-05Fix parsing of `\'` in man/ms readers.John MacFarlane1-1/+1
It was being parsed as a backtick. Closes #6175.
2020-03-05Fix parsing of `\.` in man/ms readers.John MacFarlane1-1/+1
Previously due to a typo it was being parsed as `` ` ``. Closes #6175.
2020-03-04EPUB writer: fix regression on detection of front/back/bodymatter.John MacFarlane1-1/+2
This bug caused sections with epub:type "dedication" to be misplaced in bodymatter instead of frontmatter as specified in the manual. The same problem would affect other epub:types. The pattern matching needed to be changed with the use of `makeSection`. Closes #6170.
2020-03-02PDF via wkhtmltopdf: put user-specified options last.John MacFarlane1-2/+2
Certain options (e.g. "cover") need to come after flags on the command line. Closes #6171.
2020-02-21Fix table alignment when heading begins with t.John MacFarlane1-1/+1
Due to a typo (`t` instead of `\t`) we were center aligning column headings that begin with a lowercase t! Closes #6153.
2020-02-19Text.Pandoc.App: set resource path at the beginning...John MacFarlane1-1/+2
...so it can affect things like include-in-header. See #5982.
2020-02-17Revert "Allow specifying string value in metadata using `!!literal` tag."John MacFarlane1-6/+4
This reverts commit 3493d6afaa6586c46898cf8bdb0c45bb70d31f28. This might be worth considering in the future, but let's not do it yet...the additional complexity needs a better justification.
2020-02-17Allow specifying string value in metadata using `!!literal` tag.John MacFarlane1-4/+6
This is experimental. Normally metadata values are interpreted as markdown, but if the !!literal tag is used they will be interpreted as plain strings. We need to consider whether this can still be implemented if we switch back from HsYAML to yaml for performance reasons.
2020-02-17Remove redundant `otherwise` guard in inlineToAsciiDoc (#6146)Ryan Scott1-1/+0
The `RawInline` case in `inlineToAsciiDoc` currenty looks like this: ```hs inlineToAsciiDoc _ il@(RawInline f s) | f == "asciidoc" = return $ literal s | otherwise = do report $ InlineNotRendered il return empty | otherwise = return empty ``` Notice how there are there are two overlapping `otherwise` guards. The second `otherwise` guard is completely unreachable, so this patch removes it.
2020-02-14Fixes: group biblatex citations even with prefix and suffix (#6058)Ethan Riley1-25/+42
Closes #5849. Previously biblatex citations were only grouped if there was no prefix. This patch allows them to be grouped in subgroups split by prefixes and suffixes, which allows better citation sorting.
2020-02-13A bit more cleanup (#6141)Joseph C. Sible5-34/+32
* Remove unnecessary fmaps and only do toMilliseconds once * Share the input tuple intead of making a new one * Lift return out of if * Simplify case statements * Lift DottedNum out of the case statements * Use st instead of mbs * Use setState instead of updateState now that we have the whole state around
2020-02-13Add highlight directive to the rST reader (#6140)Lucas Escot2-4/+13
2020-02-12Add Text.Pandoc.Image with unexported svgToPng.John MacFarlane1-0/+40
2020-02-12Introduce new format variants for JATS (#6067)Albert Krewinkel3-42/+107
New formats: - `jats_archiving` for the "Archiving and Interchange Tag Set", - `jats_publishing` for the "Journal Publishing Tag Set", and - `jats_articleauthoring` for the "Article Authoring Tag Set." The "jats" output format is now an alias for "jats_archiving". Closes: #6014