aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Metadata.hs
AgeCommit message (Collapse)AuthorFilesLines
2020-11-10Remove redundant bracket.John MacFarlane1-1/+1
2020-11-10Fix corner case in YAML metadata parsing.John MacFarlane1-1/+4
Previously YAML metadata would sometimes not get recognized if a field ended with a newline followed by spaces. Closes #6823.
2020-11-07Lint code in PRs and when committing to master (#6790)Albert Krewinkel1-1/+1
* Remove unused LANGUAGE pragmata * Apply HLint suggestions * Configure HLint to ignore some warnings * Lint code when committing to master
2020-10-08Qualify some uses of fail to avoid ambiguity.John MacFarlane1-6/+6
2020-10-07Remove redundant import.John MacFarlane1-1/+0
2020-10-07Raise informative errors when YAML metadata parsing fails.John MacFarlane1-26/+14
Closes #6730. Previously the command would succeed, returning empty metadata, with no errors or warnings. API changes: - Remove now unused CouldNotParseYamlMetadata constructor for LogMessage (T.P.Logging). - Add 'Maybe FilePath' parameter to yamlToMeta in T.P.Readers.Markdown.
2020-10-05Fixed regresison in last commit.John MacFarlane1-21/+42
Parsing of YAML bibliographies was broken; this fixes it.
2020-10-05Add yamlToRefs, yamlBsToRefs.John MacFarlane1-1/+44
T.P.Readers.Markdown now exports yamlToRefs. [API change] T.P.Readers.Metadata exports yamlBsToRefs. [API change] These allow specifying an id filter so we parse only references that are used in the document. Improves timing with a 3M yaml references file from 36s to 17s.
2020-06-29Clean up T.P.R.MetadataNikolay Yakimov1-36/+23
2020-06-29Unify defaults and markdown metadata parsersNikolay Yakimov1-13/+15
2020-06-28Remove obsolete RelaxedPolyRec extension (#6487)Nikolay Yakimov1-1/+0
2020-03-22Finer grained imports of Text.Pandoc.Class submodules (#6203)Albert Krewinkel1-1/+1
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-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
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-07Apply linter suggestions. Add fix_spacing to lint target in Makefile.John MacFarlane1-9/+6
2020-02-07Resolve HLint warningsAlbert Krewinkel1-5/+1
All warnings are either fixed or, if more appropriate, HLint is configured to ignore them. HLint suggestions remain. * Ignore "Use camelCase" warnings in Lua and legacy code * Fix or ignore remaining HLint warnings * Remove redundant brackets * Remove redundant `return`s * Remove redundant as-pattern * Fuse mapM_/map * Use `.` to shorten code * Remove redundant `fmap` * Remove unused LANGUAGE pragmas * Hoist `not` in Text.Pandoc.App * Use fewer imports for `Text.DocTemplates` * Remove redundant `do`s * Remove redundant `$`s * Jira reader: remove unnecessary parentheses
2019-11-24Add unexported Text.Pandoc.Readers.Metadata.John MacFarlane1-0/+140
For YAML metadata parsing. A step in the direction of #5914. No API change.