diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-10-10 13:54:58 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-10-10 23:21:18 -0700 |
commit | 7388cd3e7a49297a7368a7e77d8f2d86d6965006 (patch) | |
tree | 30d482dbad6494a4e6239f37afb1bac496c93b6e /src/Text/Pandoc/Writers | |
parent | 25239414537949486b7feaf7e05336aff0535cf8 (diff) | |
download | pandoc-7388cd3e7a49297a7368a7e77d8f2d86d6965006.tar.gz |
Improve parsing of --defaults.
- Add FromYAML instances to Opt and to all subsidiary types.
- Remove the use of HsYAML-aeson, which doesn't give good
position information on errors.
- Rename some fields in Opt to better match cli options or
reflect what the ycontain [API change]:
+ optMetadataFile -> optMetadataFiles
+ optPDFEngineArgs -> optPDFEngineOpts
+ optWrapText -> optWrap
- Add IpynbOutput enumerated type to Text.Pandoc.App.Opts.
Use this instead fo a string for optIpynbOutput.
- Add FromYAML instance for Filter in Text.Pandoc.Filters.
With these changes parsing of defaults files should be
complete and should give decent error messages.
Now (unlike before) we get an error if an unknown field
is used.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Math.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/Math.hs b/src/Text/Pandoc/Writers/Math.hs index a84f74f00..3905a3abc 100644 --- a/src/Text/Pandoc/Writers/Math.hs +++ b/src/Text/Pandoc/Writers/Math.hs @@ -12,6 +12,7 @@ import Text.Pandoc.Class import Text.Pandoc.Definition import Text.Pandoc.Logging import Text.TeXMath (DisplayType (..), Exp, readTeX, writePandoc) +import Text.Pandoc.Options (defaultMathJaxURL, defaultKaTeXURL) -- | Converts a raw TeX math formula to a list of 'Pandoc' inlines. -- Defaults to raw formula between @$@ or @$$@ characters if entire formula @@ -51,8 +52,3 @@ convertMath writer mt str = DisplayMath -> DisplayBlock InlineMath -> DisplayInline -defaultMathJaxURL :: String -defaultMathJaxURL = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/" - -defaultKaTeXURL :: String -defaultKaTeXURL = "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/" |