Commit graph

5405 commits

Author SHA1 Message Date
Uli Köhler
9d07db933c MediaWiki reader doesn't recognize german "Bild" 2014-08-06 00:47:23 +02:00
John MacFarlane
1819bdfaed Merge pull request #1487 from mpickering/master
MediaBag: Improved normalisation when writing files
2014-08-05 08:28:28 -07:00
Matthew Pickering
b04bb3b6d2 MediaBag: Improved normalisation when writing files 2014-08-05 11:02:23 +01:00
John MacFarlane
2de2842bdd Merge pull request #1486 from Aelve/minor
Very minor cleanup and readability changes
2014-08-04 22:07:02 -07:00
John MacFarlane
39b59b7603 Merge pull request #1476 from jkr/endnote-fix
Docx Parser: Produce endnotes.
2014-08-04 21:59:58 -07:00
John MacFarlane
d71b013841 HTML reader: ignore <?xml..> and <DOCTYPE..> tags.
Previously they were parsed as raw.
2014-08-04 18:39:39 -07:00
John MacFarlane
2fabdf9d93 README: Removed duplicate ref of [EPUB]. 2014-08-04 12:43:13 -07:00
John MacFarlane
40d8100d44 Use texmath 0.7 interface. 2014-08-04 11:13:09 -07:00
Artyom Kazak
675b15458a Slightly fix readability of main program file. 2014-08-04 19:58:25 +04:00
Artyom Kazak
141fdf944a Add PatternGuards pragmas. 2014-08-04 19:58:25 +04:00
Artyom Kazak
eb88444452 Remove redundant isHexDigit function. 2014-08-04 19:58:25 +04:00
Artyom Kazak
e51a2cedf9 Remove dangling where from one function. 2014-08-04 19:58:25 +04:00
Artyom Kazak
82118b3328 Use stripPrefix where appropriate. 2014-08-04 19:57:42 +04:00
Artyom Kazak
feebab9740 Clean up mediaTypeOf a bit. 2014-08-04 19:41:37 +04:00
Artyom Kazak
f659644fcc Use mapM_ instead of () <$ mapM in one place. 2014-08-04 19:41:37 +04:00
John MacFarlane
4630cff2a6 Merge branch 'epubend' of https://github.com/mpickering/pandoc into mpickering-epubend
Conflicts:
	pandoc.cabal
2014-08-04 07:36:18 -07:00
John MacFarlane
81335df9a5 Merge pull request #1461 from cben/readme-linkable-extensions
README: linkable extensions
2014-08-03 11:50:07 -07:00
John MacFarlane
cafc3c6e6c Merge pull request #1479 from Aelve/capitalise
Correctly implement capitalisation.
2014-08-03 11:48:21 -07:00
Artyom Kazak
f6cf8e8b4b Add plain writer testing module to .cabal file. 2014-08-03 18:32:31 +04:00
Artyom Kazak
ec88d47f23 Correctly implement capitalisation.
Using `map toUpper` to capitalise text is wrong, as e.g.
“Straße” should be converted to “STRASSE”, which is 1 character
longer. This commit adds a `capitalize` function and replaces
2 identical implementations in different modules (`toCaps` and
`capitalize`) with it.
2014-08-03 17:37:37 +04:00
John MacFarlane
842c705097 SelfContained: Fixed determining of source URL from within CSS files.
(This fixes a bug introduced a couple commits back.)
2014-08-02 16:33:22 -07:00
John MacFarlane
85ff3c5771 fetchItem: improved mime type guessing.
Strip a fragment like `?#iefix` from the extension before doing
the mime lookup.
2014-08-02 16:32:11 -07:00
John MacFarlane
1d137fbed6 Shared: fetchItem improvements.
* More consistent logic:  absolute URIs are fetched from the net;
  other things are treated as relative URIs if sourceURL is a Just,
  otherwise as file paths.
* We escape characters that are not allowed in URIs before trying
  to parse them (e.g. '|', which often occurs in the wild).
* When treating relative paths as local file paths, we drop
  any fragment or query.  This is useful e.g. when you've downloaded
  web fonts locally, but your source still contains the original
  relative URLs.

Together with the previous commit, this should close #1477.
2014-08-02 16:12:05 -07:00
John MacFarlane
ce8922437d Text.Pandoc.SelfContained changes.
* mkSelfContained now takes just two arguments, WriterOptions and
  the string.
* It no longer looks in data files.  This only made sense when we
  had copies of slidy and S5 code there.
* Shared.fetchItem' is used instead of the nearly duplicate getItem.
2014-08-02 16:07:19 -07:00
John MacFarlane
cbaaa17d49 Bump aeson upper bound. 2014-08-02 15:14:15 -07:00
John MacFarlane
36c9537b90 benchmark: use only test suite for benchmark.
This way the benchmarks don't take so long to run.
2014-08-01 13:40:26 -07:00
John MacFarlane
836d1f06bb Use nfIO in benchmark instead of getLength trick. 2014-08-01 13:20:08 -07:00
John MacFarlane
a1bb71a02c Merge pull request #1475 from Aelve/fix-benchmark
Make benchmarks compile again.
2014-08-01 08:40:36 -07:00
Jesse Rosenthal
3a411c3307 Docx Parser: Produce endnotes.
The parser had been changing footnotes and endnotes into footnotes. This
isn't a problem, because pandoc collapses them, but the parser should
maintain as much of the docx structure as is collapsed, and let the
toplevel reader worry about how to translate it into Pandoc. (This would
be an issue when, as is planned, the docx parser spins off into its
own module.)

The output is the same, so no test change is required.
2014-08-01 09:16:42 -04:00
Artyom Kazak
857c63f77e Make benchmarks compile again.
Additionally, fix the problem which caused one failing benchmark
to stop other benchmarks from running.
2014-08-01 15:40:25 +04:00
John MacFarlane
1b9371cfdf Merge branch 'underline-option' of https://github.com/jkr/pandoc 2014-07-31 16:40:20 -07:00
John MacFarlane
f075b0e5d9 pandoc.hs: More code reorganization. 2014-07-31 16:27:06 -07:00
Jesse Rosenthal
43ca784d1c Update docx test to interpret single underline as emph. 2014-07-31 18:46:43 -04:00
Jesse Rosenthal
57939a9282 Docx Reader: Single underlines are "emph"
All other underlines are ignored.
2014-07-31 18:44:41 -04:00
John MacFarlane
2b7e7acc4b Merge pull request #1473 from jkr/mediabag-test-2
Docx tests: rewrite mediabag tests.
2014-07-31 15:28:20 -07:00
Matthew Pickering
cd9a5d90cb EPUB Reader: Now uses the new MediaBag for images 2014-07-31 22:48:08 +01:00
Beni Cherniavsky-Paskin
4919b1b568 README: make all extension headers H4 2014-07-31 23:56:40 +03:00
Matthew Pickering
d6717c7aba README: Updated with EPUB information 2014-07-31 21:39:50 +01:00
Matthew Pickering
0ae2c1f146 EPUB Reader: Added tests 2014-07-31 21:39:50 +01:00
Matthew Pickering
8460ea417f EPUB Reader: Integrated into program 2014-07-31 21:39:50 +01:00
Matthew Pickering
51051e9953 HTML Reader: Added ability to read MathML formatted <math> blocks 2014-07-31 21:39:50 +01:00
Matthew Pickering
7c1f867397 HTML Reader: Added support for anchors on links and list items 2014-07-31 21:39:50 +01:00
Matthew Pickering
266e1977e0 HTML Reader: Extended HTML Reader to recognise EPUB specific elements 2014-07-31 21:39:49 +01:00
Matthew Pickering
002ae95d7a Options: Added option to turn on epub html extensions 2014-07-31 21:39:49 +01:00
Matthew Pickering
b57e554b59 Except Compat: Updated to export more module functions 2014-07-31 21:39:49 +01:00
Matthew Pickering
089745af61 EPUB Reader: Added EPUB reader 2014-07-31 21:39:49 +01:00
Beni Cherniavsky-Paskin
dc799507e1 README: blank line after headers 2014-07-31 23:11:56 +03:00
John MacFarlane
0565a81676 pandoc.hs: Rewrote some of the logic for clarity. 2014-07-31 12:51:01 -07:00
Jesse Rosenthal
96ad37536e Remove now unneeded JSON test file. 2014-07-31 15:47:45 -04:00
Jesse Rosenthal
ed71e9b31d Docx tests: rewrite mediabag tests.
This will allow us to test the whole mediabag (making sure, for example,
that images are added with the correct keys) instead of just individual
extracted images. We compare each entry in the media bag to an image
extracted on the fly from the docx. As a result, we only need one file
to test with.

The image in the current tests was also replaced with a smaller one.
2014-07-31 15:47:45 -04:00