aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Org/Shared.hs
AgeCommit message (Collapse)AuthorFilesLines
2020-06-20Recognize images with uppercase extensionsAlbert Krewinkel1-1/+2
Fixes: #6472
2020-03-15Use implicit Prelude (#6187)Albert Krewinkel1-2/+0
* 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-13Update copyright year (#6186)Albert Krewinkel1-1/+1
* Update copyright year * Copyright: add notes for Lua and Jira modules
2019-11-12Switch to new pandoc-types and use Text instead of String [API change].despresc1-25/+25
PR #5884. + Use pandoc-types 1.20 and texmath 0.12. + Text is now used instead of String, with a few exceptions. + In the MediaBag module, some of the types using Strings were switched to use FilePath instead (not Text). + In the Parsing module, new parsers `manyChar`, `many1Char`, `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`, `mantyUntilChar` have been added: these are like their unsuffixed counterparts but pack some or all of their output. + `glob` in Text.Pandoc.Class still takes String since it seems to be intended as an interface to Glob, which uses strings. It seems to be used only once in the package, in the EPUB writer, so that is not hard to change.
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-2/+2
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2019-01-01Org reader: fix treatment of links to imagesAlbert Krewinkel1-2/+1
Links with descriptions which are pointing to images are no longer read as inline images, but as proper links. Fixes: #5191
2018-09-26Force inline code blocks to honor export options.leungbk1-0/+4
`exportsCode` is moved from `Blocks.hs` to `Shared.hs` and exported accordingly.
2018-05-09Org reader: fix image filename recognitionAlbert Krewinkel1-6/+7
Use a function from the *filepath* library to check whether a string is a valid file name. The custom validity checker that was used before gave wrong results, e.g. for absolute file paths on Windows (kawabata/ox-pandoc#52).
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-08-09Org reader: use org-language attribute rather than data-org-language.John MacFarlane1-1/+1
2017-06-03Org reader: apply hlint suggestionsAlbert Krewinkel1-1/+1
2017-05-31Org reader: fix module names in haddock commentsAlbert Krewinkel1-1/+1
Copy-pasting had lead to haddock module descriptions containing the wrong module names.
2017-05-13Update dates in copyright noticesAlbert Krewinkel1-2/+2
This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-04-23Org reader: stop adding rundoc prefix to src paramsAlbert Krewinkel1-13/+11
Source block parameter names are no longer prefixed with *rundoc*. This was intended to simplify working with the rundoc project, a babel runner. However, the rundoc project is unmaintained, and adding those markers is not the reader's job anyway. The original language that is specified for a source element is now retained as the `data-org-language` attribute and only added if it differs from the translated language.
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-4/+4
2016-08-09Org reader: ensure image sources are proper linksAlbert Krewinkel1-2/+23
Image sources as those in plain images, image links, or figures, must be proper URIs or relative file paths to be recognized as images. This restriction is now enforced for all image sources. This also fixes the reader's usage of uncleaned image sources, leading to `file:` prefixes not being deleted from figure images (e.g. `[[file:image.jpg]]` leading to a broken image `<img src="file:image.jpg"/>) Thanks to @bsag for noticing this bug.
2016-06-02Org reader: undo code duplicationAlbert Krewinkel1-0/+76
Some code was duplicated (copy-pasted) or placed in an inappropriate module during the modularization refactoring. Those functions are moved into a `Shared` module, as was originally intended but forgotten. Better documentation of the respective functions is a positive side-effect.