aboutsummaryrefslogtreecommitdiff
path: root/src
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-18Markdown writer: Use bracketed form for native spans...John MacFarlane
...when `bracketed_spans` enabled. Closes #3229.
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-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-02Docx Reader: abstract out function to avoid code repetition.Jesse Rosenthal
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
2016-11-01Handle hungarumlaut in LaTeX reader. Closes #3201.John MacFarlane
2016-11-01[odt] Infer tables' header props from rows (#3199)hubertp-lshift
ODT reader simply provided an empty header list which meant that the contents of the whole table, even if not empty, was simply ignored. While we still do not infer headers we at least have to provide default properties of columns.
2016-10-31LaTeX reader: allow for []s inside LaTeX optional args.John MacFarlane
Fixes cases like: \begin{center} \begin{tikzpicture}[baseline={([yshift=+-.5ex]current bounding box.center)}, level distance=24pt] \Tree [.{S} [.NP John\index{i} ] [.VP [.V likes ] [.NP himself\index{i,*j} ]]] \end{tikzpicture} \end{center}
2016-10-30Org reader: support `ATTR_HTML` for special blocksAlbert Krewinkel
Special blocks (i.e. blocks with unrecognized names) can be prefixed with an `ATTR_HTML` block attribute. The attributes defined in that meta-directive are added to the `Div` which is used to represent the special block. Closes: #3182
2016-10-30Org reader: support the `todo` export optionAlbert Krewinkel
The `todo` export option allows to toggle the inclusion of TODO keywords in the output. Setting this to `nil` causes TODO keywords to be dropped from headlines. The default is to include the keywords.
2016-10-30Org reader: add support for todo-markersAlbert Krewinkel
Headlines can have optional todo-markers which can be controlled via the `#+TODO`, `#+SEQ_TODO`, or `#+TYP_TODO` meta directive. Multiple such directives can be given, each adding a new set of recognized todo-markers. If no custom todo-markers are defined, the default `TODO` and `DONE` markers are used. Todo-markers are conceptually separate from headline text and are hence excluded when autogenerating headline IDs. The markers are rendered as spans and labelled with two classes: One class is the markers name, the other signals the todo-state of the marker (either `todo` or `done`).
2016-10-26Markdown Reader: add attributes for autolink (#3183)Daniele D'Orazio
2016-10-25reveal.js: don't change slide title to level 1 header.John MacFarlane
This also affects other HTML slide show formats. Closes #2221.
2016-10-24Export Text.Pandoc.Error in Text.Pandoc.John MacFarlane
[API change]