Commit Graph
10211 Commits
Author SHA1 Message Date
Caleb McDaniel a9f00ee0d6 document fenced_code_attributes extension
Adds explanation of this extension to the README, using
description provided in 7654db9df1.
2014-07-12 15:48:54 -05:00
Jesse Rosenthal fe2eda9d54 Docx Reader: Add a compatibility layer for Except.
mtl switched from ErrorT to ExceptT, but we're not sure which mtl we'll
be dealing with. This should make errors work with both.

The main difference (beside the name of the module and the monad
transformer) is that Except doesn't require an instance of an Error
Typeclass. So we define that for compatability. When we switch to a
later mtl, using Control.Monad.Exception, we can just erase the instance
declaration, and all should work fine.
2014-07-12 18:04:06 +01:00
Jesse Rosenthal d65fd58171 Docx Reader: A nicer Docx type.
This modifies the Docx type in the parser to avoid all the extra files
(Notes, numbering, etc). A reader monad keeps track of these, and applies
them at the end. The reader monad is stacked with ErrorT to enable better
error-handling than the old Maybes. (Note that the better error handling
isn't really there yet, but it is now possible.)

One long-term goal of these changes is to make it easier to write the Docx
type. This should make it easier to develop a standalone docx package in the
future.
2014-07-12 18:03:27 +01:00
John MacFarlane 7654db9df1 Markdown writer: don't use braced attributes for fenced code.
Removed `Ext_fenced_code_attributes` from `markdown_github`
extensions.

If this extension is not set, the first class attribute will
be printed after the opening fence as a bare word.

Closes #1416.
2014-07-11 15:54:21 -07:00
Matthew Pickering 72fe742ca0 Removed inline fmap from Parsing.hs
Replaced all inline occurences of fmap with the more idiomatic (<$>).
2014-07-11 12:53:31 +01:00
Matthew Pickering 2fb8063f78 Removed (>>~) function
This function is equivalent to the more general (<*) which is defined in
Control.Applicative. This change makes pandoc code easier to understand for
those not familar with the codebase.
2014-07-11 12:51:26 +01:00
Matthew Pickering f201bdcb58 Generalised all functions in Parsing.hs
Before it wasn't possible to use these general combinators with the ParsecT
transformer but with the more general types this is now possible.
2014-07-11 12:45:34 +01:00
John MacFarlane 05a5b4e3c2 HTML writer: Deactivate "incremental" inside slide speaker notes.
Closes #1394.
2014-07-10 15:05:24 -07:00
John MacFarlane 9e0495cb83 Fixed an issue caused by e4263d306e.
This sets `stateInHtmlBlock` to `Just "div"` when we're parsing
an HTML div.

Without this fix, a closing `</div>` tag could be parsed as part
of a list item rather than after the list.
2014-07-10 15:04:18 -07:00
John MacFarlane 83d4c2733c Markdown reader: Fixed regression with intraword underscores.
Closes #1121.
2014-07-10 14:51:08 -07:00
John MacFarlane ee522be94f Markdown reader: Slight rewrite of enclosure/emphOrStrong code.
Semantics should be the same.
2014-07-10 14:37:10 -07:00
John MacFarlane ff86702a95 Added failing test for issue #1121. 2014-07-10 14:23:20 -07:00
John MacFarlane ca159de30a Documented fact that you can put YAML metadata in a separate file.
See #1412.
2014-07-10 13:49:40 -07:00
John MacFarlane 66378062b6 LaTeX writer: Put table captions above tables.
The standard seems to be captions above tables.  (See
http://tex.stackexchange.com/questions/3243/why-should-a-table-caption-be-placed-above-the-table)
2014-07-10 13:06:41 -07:00
Clare Macrae c7431283d6 DokuWiki writer: Remove broken formatting from headings (#1398) 2014-07-08 22:05:04 +01:00
Clare Macrae 5769f178e1 Put myself as maintainer (#1398) 2014-07-08 21:18:31 +01:00
John MacFarlane 7d6da118d3 Added type attribute to link tags in epub3 template.
They are supposed to be only "advisory" in HTML5, but apparently
kindlegen needs them.
2014-07-08 00:24:17 -06:00
John MacFarlane 4425dfc894 Added type="text/css" to link tags in epub3 template. 2014-07-08 00:23:51 -06:00
John MacFarlane d1ac594d4a Added test for issue #1330. 2014-07-07 22:27:28 -06:00
John MacFarlane f96a2b91f5 Reorganized some markdown tests. 2014-07-07 22:21:04 -06:00
John MacFarlane 3d2f2ec0c6 Updated dokuwiki tests for latest changes to testsuite.native. 2014-07-07 16:25:41 -06:00
John MacFarlane 7560f99167 Document DokuWiki writer in README. 2014-07-07 16:20:28 -06:00
John MacFarlane 7d9136edbb Minor line wrapping. 2014-07-07 16:20:18 -06:00
John MacFarlane 616cf6c539 Merge branch 'dokuwiki' of https://github.com/claremacrae/pandoc into claremacrae-dokuwiki 2014-07-07 16:15:35 -06:00
John MacFarlane e4263d306e Revamped raw HTML block parsing in markdown.
- We no longer include trailing spaces and newlines in the
  raw blocks.
- We look for closing tags for elements (but without backtracking).
- Each block-level tag is its own RawBlock; we no longer try to
  consolidate them (though `--normalize` will do so).

Closes #1330.
2014-07-07 15:53:59 -06:00
John MacFarlane 91b902f02f EPUB writer: better handle HTML media tags. 2014-07-07 15:53:59 -06:00
John MacFarlane 3d4e76f342 Parsing: Added stateInHtmlBlock to ParserState.
This is used to keep track of the ending tag we're waiting
for when we're parsing inside HTML block tags.
2014-07-07 15:53:59 -06:00
John MacFarlane 8c7abf173a normalize: consolidate adjacent RawBlocks when possible. 2014-07-07 15:53:59 -06:00
John MacFarlane cbeb931554 HTML reader: adjust blockTags and eitherBlockOrInline.
- Added `audio` and `source` in `eitherBlockOrInline`.
- Moved `video`, `svg`, `progress`, `script`, `noscript`, `svg` from
  `blockTags` to `eitherBlockOrInline`.
- `map` and `object` were mistakenly in both lists; they have been removed
  from `blockTags`.
2014-07-07 15:53:59 -06:00
John MacFarlane 186b8e71e0 Merge pull request #1397 from jkr/equations
Docx Reader: Parse Docx OMML math/equations
2014-07-07 11:13:03 -06:00
John MacFarlane 5ea21760d9 MediaWiki writer: Minor renaming of 'st' prefixed names. 2014-07-04 18:56:11 -06:00
John MacFarlane fb2e92b7fc Merge pull request #1399 from xkollar/reader
Modad.Reader + HLint for MediaWiki writer
2014-07-04 18:38:34 -06:00
Matej Kollar 0bda602fcb Little restructuralization. 2014-07-04 23:48:58 +02:00
Matej Kollar d2c81346e7 Move more things to Reader. 2014-07-04 23:42:10 +02:00
Matej Kollar 0bc900e36a HLint suggestions. 2014-07-04 23:25:44 +02:00
Clare Macrae 5e25bff392 Revert "DokuWiki writer: Whitespace to a testsuite output file."
This reverts commit 23d71b13e7.

This is now resulting in a testsuite failure, and I can't see why
it didn't do so before
2014-07-02 22:48:04 +01:00
Clare Macrae 0c6f06b8a4 DokuWiki writer: Span no longer swallows text 2014-07-02 22:40:34 +01:00
Clare Macrae 7647d87657 DokuWiki writer: Add new test showing that span swallows content. 2014-07-02 22:26:11 +01:00
Clare Macrae 23d71b13e7 DokuWiki writer: Whitespace to a testsuite output file.
This doesn't change the testsuite behaviour, but it does mean that
all the testsuite output files are exactly identical to the 
output obtained by running the current pandoc.
2014-07-02 22:10:20 +01:00
Jesse Rosenthal d77ccbba63 Docx Reader: Write LaTeX based on equations in word.
This is a first stab at writing out equations in LaTeX based on
omml equations in Word. There are some glitches: unicode chars not known to
LaTeX are silently skipped, and functions (such as `\oiiint`) not in the
standard LaTeX packages are inserted, which can lead to pdf compilation
errors (depending, of course, on your preamble).

Adding, for example, `\usepackage[charter]{mathdesign}` to the preamble will
allow you to use most of the more esoteric functions.
2014-07-02 16:54:33 -04:00
Jesse Rosenthal 9f4bacf86f Docx Reader: Add new file, TexChar.
This will allow us to deal with unicode characters from word equations. This
part of the process will need to continue to be improved.
2014-07-02 16:53:28 -04:00
Jesse Rosenthal 2bc0c77791 Docx Reader: Parse omml equations. 2014-07-02 16:52:39 -04:00
Clare Macrae 3faf31678e DokuWiki writer: Remove todos that I have already done. 2014-07-02 21:44:05 +01:00
Clare Macrae 61cc983bea DokuWiki writer: Retain unknown RawBlock and RawInline text
This added \cite and \begin latex to the testuite output.
2014-07-02 21:40:12 +01:00
Clare Macrae d234157d25 DokuWiki output: Implement blockquotes properly
TODO Also implement nested blockquotes.
2014-07-02 21:26:24 +01:00
Clare Macrae 92a962ba63 DokuWiki writer: remove unused code 2014-07-02 21:01:33 +01:00
Matej Kollar 05b94c31ae Use Reader.
To avoid to pass opts explicitly around (as we
do not use it very much at the moment anyway)
2014-07-02 06:36:31 +02:00
Clare Macrae 3cb76d9560 Merge branch 'master' of git://github.com/jgm/pandoc into dokuwiki 2014-07-01 22:10:08 +01:00
Clare Macrae 244c4eee74 Remove stray <div> and </div> from DokuWiki output (#386) 2014-07-01 21:42:21 +01:00
Clare Macrae 0727579167 Improved HTML Blocks in DokuWiki output (#386)
For example, this fixes the display of a broken table, and 
it also fixes the various  HTML horizontal rules.
2014-07-01 21:21:09 +01:00