aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)AuthorFilesLines
2017-01-25Make opaque typeclasses PandocPure and PandocIOJesse Rosenthal1-33/+75
2017-01-25Class: Specify Functor and ApplicativeJesse Rosenthal1-1/+1
We're still compiling for 7.8 which is pre-AMP, so let's just be explicit about it so we can use applicative notation.
2017-01-25Remove Text.Pandoc.FreeJesse Rosenthal1-269/+0
2017-01-25Convert writers to use PandocMonad typeclass.Jesse Rosenthal6-142/+122
Instead of Free Monad with runIO
2017-01-25Introduce PandocMonad typeclass.Jesse Rosenthal1-0/+202
This can be instantiated by both an IO monad or a pure State monad.
2017-01-25Remove GetPOSIXTime from Free monad.Jesse Rosenthal1-7/+2
We still export a P.getPOSIXTime function, but it's just internally defined in terms of P.getCurrentTime.
2017-01-25Free: Remove readFileUTF8.Jesse Rosenthal2-13/+1
This is just defined in term of a bytestring, so we convert when necessary.
2017-01-25Remove readFileStrict.Jesse Rosenthal2-13/+2
We only used it once, and then immediately converted to lazy.
2017-01-25Remove IO UUID functions.Jesse Rosenthal2-17/+2
2017-01-25Write Pure uuid function taking stdgen.Jesse Rosenthal1-11/+12
We're trying to cut down the necessarily IO functions. Since we alerady have a newStdGen function, we don't need this one.
2017-01-25ODT Writer: fix compiler complaint.Jesse Rosenthal1-1/+0
2017-01-25Free: Add Typeable instance to PandocActionErrorJesse Rosenthal1-2/+3
2017-01-25Finish pure writer of FB2.Jesse Rosenthal1-10/+17
2017-01-25FB2 writer: Rewrite image-fetching to use fetchItem.Jesse Rosenthal1-43/+11
This uses the function from shared, which will allow us to convert it over to the free monad.
2017-01-25Continue refactoring FB2 writer.Jesse Rosenthal1-8/+14
2017-01-25FB2 writer: bring functions to toplevel.Jesse Rosenthal1-47/+53
This is the first of a number of changes to bring the FB2 writer a bit closer to the idioms used elsewhere in pandoc, so it can be more easily converted to using the pure functions from Free.
2017-01-25Make pure rtf writer using free.Jesse Rosenthal1-4/+13
2017-01-25Fix up compiler warnings.Jesse Rosenthal1-1/+3
Export TestState and TestEnv, and remove redundant import.
2017-01-25Implement runTest functions.Jesse Rosenthal6-84/+176
These work with a State monad and a Reader monad to produce deterministic results. It can probably be simplified somewhat.
2017-01-25Remove IORef from EPUB writer.Jesse Rosenthal1-51/+62
2017-01-25Remove IORef from ODT writer.Jesse Rosenthal1-24/+38
We want pure writers, so IORef shouldn't be in there. We switch to using a normal State Monad. If this produces performance problems, we can look into trying STRefs, but that seems like unnecessary complication at the moment.
2017-01-25Introduce pure versions of IO Writers.Jesse Rosenthal4-90/+124
Using Text.Pandoc.Free, introduce pure versions of Docx, EPUB, ICML, and ODT writers. Each of the pure versions is exported along with the IO version (produced by running `runIO` on the pure reader). Ideally, this should make the writers easier to test.
2017-01-25New Free module, with pure versions of IO funcsJesse Rosenthal1-0/+209
Introduce a new module, Text.Pandoc.Free, with pure versions, based on the free monad, of numerous IO functions used in writers and readers. These functions are in a pure Monad (PandocAction). PandocAction takes as a parameter the type of IORefs in it. It can be aliased in individual writers and readers to avoid this parameter. Note that this means that at the moment a reader can only use one type of IORef. If possible, it would be nice to remove this limitation.
2017-01-25Adds support for pagebreaks (when it makes sense)Hubert Plociniczak22-11/+48
Update all writers to take into account page breaks. A straightforwad, far from complete, implementation of page breaks in selected writers. Readers will have to follow in the future as well.
2017-01-25Added page breaks into Pandoc.Hubert Plociniczak3-13/+61
This requires an updated version of pandoc-types that introduces PageBreak definition. Not that this initial commit only introduces ODT pagebreaks and distinguishes for it page breaks before, after, or both, the paragraph, as read from the style definition.
2017-01-25Update list of listings languages in Highlighting.John MacFarlane1-54/+103
This allows more languages to be used when using the `--listings` option. Closes #3374.
2017-01-24OpenDocument writer: small refactoring.John MacFarlane1-8/+11
Removed separate 'parent' param in paraStyle.
2017-01-23OpenDocument writer: don't profilerate text styles unnecessarily.John MacFarlane1-25/+62
This change makes the writer create only as many temporary text styles as are absolutely necessary. It also consolidates adjacent nodes with the same style. Closes #3371.
2017-01-19Org reader: allow short hand for single-line raw blocksAlbert Krewinkel2-8/+17
Single-line raw blocks can be given via `#+FORMAT: raw line`, where `FORMAT` must be one of `latex`, `beamer`, `html`, or `texinfo`. Closes: #3366
2017-01-19MediaWiki reader: improved handling of display math.John MacFarlane1-2/+3
Sometimes display math is indented with more than one colon. Previously we handled these cases badly, generating definition lists and missing the math. Closes #3362.
2017-01-08Fixed -f markdown_github-hard_line_breaks+escaped_line_breaks.John MacFarlane1-0/+1
Previously this did not properly enable escaped line breaks. Closes #3341.
2017-01-06Remove pipe char irking the haddock coverage toolAlbert Krewinkel1-1/+1
Haddock documentation strings must be associated with functions. Remove pipe char from a comment that was moved into a `do` block in `Readers/Org/Inlines.hs`.
2017-01-06Org reader: accept org-ref citations followed by commasAlbert Krewinkel1-15/+16
Bugfix for an issue which, whenever the citation was immediately followed by a comma, prevented correct parsing of org-ref citations.
2017-01-05Org reader: ensure emphasis markup can be nestedAlbert Krewinkel1-0/+3
Nested emphasis markup (e.g. `/*strong and emphasized*/`) was interpreted incorrectly in that the inner markup was not recognized.
2017-01-05MediaWiki reader: Fix quotation mark parsing (#3336)tgkokk1-6/+3
Change MediaWiki reader's behavior when the smart option is parsed to match other readers' behavior. Fix #2012.
2016-12-30DocBook5 writer: make id attribute xml:id, fixes #3329 (#3330)Mauro Bieg1-1/+4
2016-12-24HTML writer: don't process pars with empty RawInline, fixes #1040 (#3327)Mauro Bieg1-3/+8
2016-12-24markdown reader: disallow space between inline code and attributes (#3326)Mauro Bieg1-2/+2
closes #3323
2016-12-23Updates to use skylighting rather than highlighting-kate.John MacFarlane3-18/+28
So far this just reproduces capacity. Later we'll be able to add features like warning messages, dynamic loading of xml syntax definitions, and dynamic loading of themes.
2016-12-21Org writer: prefix footnote numbers with `fn:`Albert Krewinkel1-2/+2
Unprefixed numbers where used by older org-mode versions, but are no longer supported.
2016-12-16LaTeX writer: allow tables with empty cells to count as "plain."John MacFarlane1-0/+1
This addresses a problem of too-wide tables when empty cells are used. Thanks to Joost Kremers for reporting the issue.
2016-12-13Docx reader: Empty header should be list of lists.Jesse Rosenthal1-9/+11
In the past, the docx reader wrote an empty header as an empty list. It should have the same width as a row (and be filled with empty cells). (Note that I've reordered the code here slightly to get rid of a call to `head`. It wasn't unsafe because it tested for null, but it was a bit of a smell.)
2016-12-11Fix display math with --webtex in markdown output.John MacFarlane1-9/+13
Closes #3298.
2016-12-08Docx reader: Ensure one-row tables don't have header.Jesse Rosenthal1-1/+2
Tables in MS Word are set by default to have special first-row formatting, which pandoc uses to determine whether or not they have a header. This means that one-row tables will, by default, have only a header -- which we imagine is not what people want. This change ensures that a one-row table is not understood to be a header only. Note that this means that it is impossible to produce a header-only table from docx, even though it is legal pandoc. But we believe that in nearly all cases, it will be an accidental (and unwelcome) result Closes #3285.
2016-12-08Removed debug trace from HTML reader.John MacFarlane1-2/+1
2016-12-07HTML reader: Understand `style=width:` as well as `width` in `col`.John MacFarlane1-2/+7
Closes #3286.
2016-12-07RST reader: print warnings when keys, substitition, notes not found.John MacFarlane1-6/+26
Previously the parsers failed and we got raw text. Now we get a link with an empty URL, or empty inlines in the case of a note or substitution.
2016-12-07RST reader: fix hyperlink aliases.John MacFarlane1-2/+10
`link <google_>`_ .. _google: https://google.com is really a reference link. Closes #3283.
2016-12-06Fixed some bad regressions in HTML table parser.John MacFarlane1-3/+3
This regression leads to the introduction of empty rows in some circumstances. Closes #3280.
2016-12-05Man writer: Ensure that periods are escaped at beginning of line.John MacFarlane1-4/+2
Closes #3270.