aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-02-16Fix typo in changelog.John MacFarlane1-1/+1
2020-02-16Small changelog fix.John MacFarlane1-6/+3
2020-02-15Use pandoc-citeproc 0.17.John MacFarlane2-2/+2
2020-02-15Update README.md.John MacFarlane1-43/+47
2020-02-15Update changelog and man page.John MacFarlane4-29/+244
2020-02-15Use latest texmath.John MacFarlane2-2/+2
2020-02-14make pandoc-templates: copy README and styles.*.John MacFarlane1-2/+2
2020-02-14Fixes: group biblatex citations even with prefix and suffix (#6058)Ethan Riley2-25/+74
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 Escot4-4/+41
2020-02-12Add Text.Pandoc.Image with unexported svgToPng.John MacFarlane2-0/+41
2020-02-12Introduce new format variants for JATS (#6067)Albert Krewinkel17-55/+2474
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
2020-02-12sample.lua - fix error message.John MacFarlane1-1/+1
image_format not img_format. Closes #6135.
2020-02-12LaTeX reader: improve caption and label parsing.John MacFarlane5-39/+53
- Don't emit empty Span elements for labels. - Put tables with labels in a surrounding Div.
2020-02-12HTML reader: don't parse `data-id` as `id` attribute.John MacFarlane1-1/+9
And similarly don't parse any `data-X` as `X` when `X` is a valid HTML attribute. Reported in comment on #5415.
2020-02-12Moved html5Attributes, html4Attributes, rdfaAttributes...John MacFarlane2-348/+354
from T.P.Writers.HTML (where they were unexported) to T.P.XML (where they are now exported). [API change: new exported functions] This allows these sets to be used elsewhere, e.g. in the HTML reader.
2020-02-11LaTeX reader: resolve `\ref` to table numbers.John MacFarlane3-25/+74
Closes #6137.
2020-02-11sample.lua: Fix typo in descriptive comments (#6136)Caleb Maclennan1-2/+1
2020-02-10Fix spurious dots in markdown_mmd metadata outputJohn MacFarlane2-1/+13
Closes #6133 (regression).
2020-02-08Org reader: simplify parsing of sub- and superscriptsAlbert Krewinkel1-11/+11
Speeds up parsing of single-word, markup-less sub- and superscripts. Fixes: #6127
2020-02-08reveal.js: ensure that pauses work even in title slides.John MacFarlane2-4/+24
Closes #5819.
2020-02-08Factor out a findM function (#6125)Joseph C. Sible3-18/+13
This adds a new function to the API: Text.Pandoc.Shared.findM.
2020-02-08Use <$> instead of >>= and return (#6128)Joseph C. Sible2-2/+2
2020-02-08Clean up after "hlint --refactor" (#6129)Joseph C. Sible3-8/+7
HLint's automatic refactoring isn't quite perfect, so some of its changes were overcomplicated, wrong, or created new findings. Clean these up.
2020-02-08More cleanup (#6130)Joseph C. Sible2-8/+7
* Use an infix operator normally instead of immediately applying an operator section * Use M.fromList
2020-02-07Apply linter suggestions. Add fix_spacing to lint target in Makefile.John MacFarlane51-279/+247
2020-02-07Resolve HLint warningsAlbert Krewinkel43-186/+178
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
2020-02-07More in-depth refactoring and cleanup (#6123)Joseph C. Sible8-44/+40
* Avoid duplicating the dash case * Pull common functions out of case branches * Make sure list lengths are only calculated once * Use unless * Simplify parseURIReference' and avoid an unnecessary call to length * Use <$> instead of reimplementing it * Use swap instead of reimplementing it * Remove eta-expansion that's been unnecessary since 90f5dd8 * Use tailDef instead of reimplementing it * Use second instead of fmap, per @tarleb
2020-02-07Various minor cleanups and refactoring (#6117)Joseph C. Sible16-66/+59
* Use concatMap instead of reimplementing it * Replace an unnecessary multi-way if with a regular if * Use sortOn instead of sortBy and comparing * Use guards instead of lots of indents for if and else * Remove redundant do blocks * Extract common functions from both branches of maybe Whenever both the Nothing and the Just branch of maybe do the same function, do that function on the result of maybe instead. * Use fmap instead of reimplementing it from maybe * Use negative forms instead of negating the positive forms * Use mapMaybe instead of mapping and then using catMaybes * Use zipWith instead of mapping over the result of zip * Use unwords instead of reimplementing it * Use <$ instead of <$> and const * Replace case of Bool with if and else * Use find instead of listToMaybe and filter * Use zipWithM instead of mapM and zip * Inline lambda wrappers into the real functions * We get zipWithM from Text.Pandoc.Writers.Shared * Use maybe instead of fromMaybe and fmap I'm not sure how this one slipped past me. * Increase a bit of indentation
2020-02-06Use traverse instead of reimplementing it (#6124)Joseph C. Sible2-8/+3
2020-02-05Simplify an overcomplicated filtering function (#6115)Joseph C. Sible1-1/+1
There's no need to use `catMaybes`, `uncurry`, `bool`, etc., just to get elements where the second element of a tuple is True.
2020-02-05Fix --number-offset with HTML TOC.John MacFarlane1-10/+19
Eventually it would be worth adding a parameter to makeSections so this could be done at that level; then it would also affect other writers that construct TOC manually.
2020-02-05MediaWiki writer: prevent triple `[[[`.John MacFarlane2-1/+21
This confuses mediawiki's parser. So we insert a `<nowiki/>` no-op between a literal `[` and a link. Closes #6119.
2020-02-05LaTeX reader: skip comments in more places where this is needed.John MacFarlane3-19/+28
Closes #6114.
2020-02-04Remove our bool function (#6116)Joseph C. Sible2-9/+1
Data.Bool already provides a bool function identical to this one.
2020-02-04Add timing info for filters in `--verbose` mode.John MacFarlane2-5/+30
+ Add RunningFilter, FilterCompleted constructors to LogMessage + When verbose mode is specified (verbosity == INFO), print a notice when running a filter and when a filter completes (including timing). Closes #6112.
2020-02-03Allow & in LaTeX citation keys.John MacFarlane1-1/+1
Closes #6110.
2020-02-03Swap suboptimal uses of maybe and fromMaybe (#6111)Joseph C. Sible5-13/+13
Anywhere "maybe" is used with "id" as its second argument, using "fromMaybe" instead will simplify the code. Conversely, anywhere "fromMaybe" is used with the result of "fmap" or "<$>" as its second argument, using "maybe" instead will simplify the code.
2020-02-03Fix duplicate frame classes in LaTeX/Beamer output.John MacFarlane2-2/+29
Close #6107.
2020-02-03Clean up overcomplicated maybe logic (#6105)Joseph C. Sible1-8/+6
We're using maybe in redundant ways. Remove it altogether in one case and simplify it to fromMaybe in another.
2020-02-03Clean up a confusing triple negative (#6102)Joseph C. Sible1-5/+5
There's currently `unless`, `not`, and `notParaOrPlain` in the same expression, which is a rather confusing triple negative. Replace `notParaOrPlain` with `paraOrPlain` and switch to `all` from `any` to clean this up.
2020-02-01Text.Pandoc.Readers.CSV - reuse CSV parser from Text.Pandoc.CSV.John MacFarlane1-65/+5
2020-02-01Fix bug in Text.Pandoc.CSV.John MacFarlane1-4/+4
Previously an extra blank record would sometimes be inserted at the end.
2020-01-31Support 'bibliography' and 'csl' fields in defaults file.John MacFarlane2-24/+42
Move addMeta from T.P.App.CommandLineOptions to T.P.App.Opt. (not an api change because modules not exported)
2020-01-31csv reader: allow empty cells.John MacFarlane2-8/+10
2020-01-31Add Text.Pandoc.Readers.CSV (readCSV).John MacFarlane6-2/+134
This adds csv as an input format. The CSV table is converted into a pandoc simple table. Closes #6100.
2020-01-29LaTeX template: add space option to xeCJK with PassOptionsToPackage.John MacFarlane1-1/+4
Otherwise we can get a clash with documentclasses that already load the package. Closes #6002.
2020-01-28Added a try that was needed for the commit fc78be1.John MacFarlane1-1/+1
The intent of that commit was to parse unknown LaTeX enivronments as verbatim if they can't be parsed normally, avoiding crashes on environments that allow unescaped underscores and the like. But the fix didn't completely work: it worked for raw TeX in markdown but not when reading LaTeX. This change fixes that. See #6034. Closes #6093.
2020-01-27Update URLs and use HTTP**S** wherever possible (#6090)Salim B1-62/+62
I've changed _all_ `http:` URLs in the file to their `https` equivalents if the respective sites have properly configured HTTPS.
2020-01-27Fix test suite for new skylighting.John MacFarlane1-2/+2
Closes #6086.