aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-19Remove GetPOSIXTime from Free monad.freeJesse Rosenthal
We still export a P.getPOSIXTime function, but it's just internally defined in terms of P.getCurrentTime.
2016-11-19Free: Remove readFileUTF8.Jesse Rosenthal
This is just defined in term of a bytestring, so we convert when necessary.
2016-11-19Remove readFileStrict.Jesse Rosenthal
We only used it once, and then immediately converted to lazy.
2016-11-19Remove IO UUID functions.Jesse Rosenthal
2016-11-19Write Pure uuid function taking stdgen.Jesse Rosenthal
We're trying to cut down the necessarily IO functions. Since we alerady have a newStdGen function, we don't need this one.
2016-11-19ODT Writer: fix compiler complaint.Jesse Rosenthal
2016-11-19Free: Add Typeable instance to PandocActionErrorJesse Rosenthal
2016-11-19Finish pure writer of FB2.Jesse Rosenthal
2016-11-19FB2 writer: Rewrite image-fetching to use fetchItem.Jesse Rosenthal
This uses the function from shared, which will allow us to convert it over to the free monad.
2016-11-19Continue refactoring FB2 writer.Jesse Rosenthal
2016-11-19FB2 writer: bring functions to toplevel.Jesse Rosenthal
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.
2016-11-19Make pure rtf writer using free.Jesse Rosenthal
2016-11-19Fix up compiler warnings.Jesse Rosenthal
Export TestState and TestEnv, and remove redundant import.
2016-11-19Implement runTest functions.Jesse Rosenthal
These work with a State monad and a Reader monad to produce deterministic results. It can probably be simplified somewhat.
2016-11-19Remove IORef from EPUB writer.Jesse Rosenthal
2016-11-19Remove IORef from ODT writer.Jesse Rosenthal
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.
2016-11-19Introduce pure versions of IO Writers.Jesse Rosenthal
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.
2016-11-19New Free module, with pure versions of IO funcsJesse Rosenthal
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.
2016-11-19Fixed xref lookup in DocBook reader. Closes #3243.John MacFarlane
It previously only worked when the qnames lacked the docbook namespace URI.
2016-11-19Org reader: Ensure images in paragraphs are not parsed as figuresAlbert Krewinkel
This fixes a regression introduced in 7e5220b57c5a48fabe6e43ba270db812593d3463.
2016-11-18Export Text.Pandoc.getDefaultExtensions.John MacFarlane
See #3178.
2016-11-18Docx writer: fixed XML markup for empty cells.John MacFarlane
Closes #3238. Previously the Compact style wasn't being applied properly to empty cells.
2016-11-18windows/stack.yaml - use latest pandoc-citeproc from git.John MacFarlane
Otherwise tests will fail on appveyor.
2016-11-18Added weigh-pandoc for memory usage diagnostics.John MacFarlane
See #3169.
2016-11-18Markdown writer: Use bracketed form for native spans...John MacFarlane
...when `bracketed_spans` enabled. Closes #3229.
2016-11-18In --version, trap error in getAppUserDataDirectory.John MacFarlane
This fixes a crash with `pandoc --version` on unusual systems with no real user (e.g. SQL Server 2016). Closes #3241.
2016-11-16Add comment acknowledging source of .travis.yml.John MacFarlane
2016-11-16remove make_travis_yml.hs (#3235)ickc
2016-11-16Small caps in Bracketed Spans (#3191)ickc
* Markdown reader: modify bracketedSpan to check small caps * MANUAL.txt: add description on the use of `bracketed_spans` in small cap * Improve markdown readers: bracketedSpan function EXACTLY as spanHtml
2016-11-15Adjust widths in Markdown grid tables so that they match on round-trip.John MacFarlane
2016-11-15Allow alignments to be specified in Markdown grid tables.John MacFarlane
2016-11-15Markdown writer: fixed inconsistent spacing issue.John MacFarlane
Previously a tight bullet sublist got rendered with a blank line after, while a tight ordered sublist did not. Now we don't get the blank line in either case. Closes #3232.
2016-11-15changelog: Moved an item that was misplaced...John MacFarlane
in the 1.17.2 section to the 1.18 section where it belongs.
2016-11-13HTML reader: only treat "a" element as link if it has href.John MacFarlane
Otherwise treat as span. Closes #3226.
2016-11-12Use correct mime types for woff and woff2.John MacFarlane
Closes #3228.
2016-11-12Markdown writer: Fix escaping of spaces in super/subscript.John MacFarlane
Previously two backslashes were inserted, which gave a literal backslash. Closes #3225.
2016-11-10Docx reader: add a placeholder value for CHART.Jesse Rosenthal
We wrap `[CHART]` in a `<span class="chart">`. Note that it maps to inlines because, in docx, anything in a drawing tag can be part of a larger paragraph.
2016-11-10Docx reader: Be more specific in parsing imagesJesse Rosenthal
We not only want "w:drawing", because that could also include charts. Now we specify "w:drawing"//"pic:pic". This shouldn't change behavior at all, but it's a first step toward allowing other sorts of drawing data as well.
2016-11-09Org reader: allow HTML attribs on non-figure imagesAlbert Krewinkel
Images which are the only element in a paragraph can still be given HTML attributes, even if the image does not have a caption and is hence not a figure. The following will add set the `width` attribute of the image to `50%`: #+ATTR_HTML: :width 50% [[file:image.jpg]] Closes: #3222
2016-11-08Inline code when text has a special styleHubert Plociniczak
When a piece of text has a text 'Source_Text' then we assume that this is a piece of the document that represents a code that needs to be inlined. Addapted an odt writer to also reflect that change; previously it was just writing a 'preformatted' text using a non-distinguishable font style. Code blocks are still not recognized by the ODT reader. That's a separate issue.
2016-11-05Markdown reader: Allow reference link labels starting with @...John MacFarlane
...if citations extension disabled. Example: in [link text][@a] [@a]: url `link text` isn't hyperlinked because `[@a]` is parsed as a citation. Previously this happened whether or not the `citations` extension was enabled. Now it happens only if the `citations` extension is enabled. Closes #3209.
2016-11-05Allow `file://` URIs as arguments.John MacFarlane
Also improved default reader format detection. Previously with a URI ending in .md or .markdown, pandoc would assume HTML input. Now it treats these as markdown. Closes #3196.
2016-11-03Improved error if they give wrong arg to --top-level-division.John MacFarlane
2016-11-02Docx Reader: abstract out function to avoid code repetition.Jesse Rosenthal
2016-11-02Docx reader/writer: Update tests for img title and altJesse Rosenthal
Closes #3204
2016-11-02Docx writer: Handle title text in images.Jesse Rosenthal
We already handled alt text. This just puts the image "title" into the docx "title" attr.
2016-11-02Docx reader: Handle Alt text and titles in images.Jesse Rosenthal
We use the "description" field as alt text and the "title" field as title. These can be accessed through the "Format Picture" dialog in Word.
2016-11-02Docx reader utils: handle empty namespace in elemNameJesse Rosenthal
Previously, if given an empty namespace: (elemName ns "" "foo") `elemName` would output a QName with a `Just ""` namespace. This is never what we want. Now we output a `Nothing`. If someone *does* want a `Just ""` in the namespace, they can enter the QName value explicitly.
2016-11-02HTML reader: treat `<math>` as MathML by default...John MacFarlane
unless something else is explicitly specified in xmlns. Provided it parses as MathML, of course. Also fixed default which should be to inline math if no display attribute is used.
2016-11-02LaTeX reader: Handle BVerbatim from fancyvrb. Fixes #3203.John MacFarlane