Commit graph

6042 commits

Author SHA1 Message Date
Matthew Pickering
4ce6471c12 Factor out "returnState" into Parsing module 2015-03-22 21:47:28 +00:00
Matthew Pickering
9e150dd7cf HLint changes 2015-03-22 21:47:28 +00:00
Matthew Pickering
17b317268b Remove F Monad from Markdown reader 2015-03-22 21:47:28 +00:00
Matthew Pickering
7690e1d17f Generalise signature of addWarning 2015-03-22 20:11:30 +00:00
Matthew Pickering
9ca34cc9a9 Add check to see whether in a footnote to ParserState (to avoid circular footnotes) 2015-03-22 20:11:30 +00:00
Matthew Pickering
de093b4e6e Remove F monad from Parsing 2015-03-22 20:11:30 +00:00
Matthew Pickering
5dc902cbcc Changed parseWithWarnings to the more general returnWarnings parser transformer 2015-03-22 20:11:30 +00:00
Matthew Pickering
f6419a2691 Remove F monad from Org Reader. 2015-03-22 20:11:29 +00:00
Matthew Pickering
8271fb574e Added generalize function which can be used to lift specialised parsers.
Monad m => Parsec s st a -> Parsec T s st m a
2015-03-22 18:57:36 +00:00
John MacFarlane
b983adf0d0 Markdown writer: fixes for GHC 7.10. 2015-03-19 11:48:05 -07:00
John MacFarlane
8b8a613cd4 Bumped upper bounds for filepath, QuickCheck.
Bumped lower bounds for highlighting-kate, texmath.
2015-03-19 11:47:20 -07:00
John MacFarlane
787664d5fc Merge pull request #2013 from ShabbyX/master
Derive from Data and Typeable for libpandoc
2015-03-19 09:16:54 -07:00
Shahbaz Youssefi
e952d6633f Derive from Data and Typeable for libpandoc
This commit derives a few types from Data and Typeable used by
libpandoc.

Requires corresponding pull-request for Highlighting-Kate:

    https://github.com/jgm/highlighting-kate/pull/64

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
2015-03-19 17:07:18 +01:00
John MacFarlane
0a82e7e4b1 Fixed a compiler warning. 2015-03-17 17:06:19 -07:00
John MacFarlane
e0d234e54d Added CommonMark reader using cmark (libcmark bindings).
- Added commonmark as an input format.
- Added `Text.Pandoc.Readers.CommonMark.readCommonMark`.
- For now, we use the markdown writer to generate benchmark
  text for the CommonMark reader.  We can change this when we
  get a writer.
2015-03-17 16:15:57 -07:00
John MacFarlane
5721a5d34b Bump criterion version bound. 2015-03-17 16:15:56 -07:00
John MacFarlane
619b2e8ca2 Merge pull request #1968 from lierdakil/issue1607
Fixes for multiple docx writer style bugs.
2015-03-16 12:02:40 -07:00
John MacFarlane
6fc578b79a Merge pull request #2008 from tomleese/fix-github-phrasing
Replace occurrences of 'Github' with 'GitHub'
2015-03-16 08:26:46 -07:00
Tom Leese
3dba66bf5d Replace occurrences of 'Github' with 'GitHub'
The website is called 'GitHub' afterall.
2015-03-16 09:28:45 +00:00
John MacFarlane
fcf1cd2f31 AsciiDoc writer: avoid wrapping after list marker.
Closes #1858.
2015-03-15 15:43:05 -07:00
John MacFarlane
451019290b AsciiDoc writer: insert some needed blank lines.
Closes #1860.
2015-03-15 14:48:01 -07:00
John MacFarlane
f6e46b7146 Moved and rewrote documentation for shortcut_reference_links ext. 2015-03-15 12:01:14 -07:00
John MacFarlane
0deb7c507d Merge pull request #1989 from zudov/shortcut_ref_link_pr
Support shortcut reference links in markdown writer
2015-03-15 11:58:30 -07:00
John MacFarlane
967c13560e Really fix #1394.
This closes #1394, which actually wasn't fixed by the earlier commit.
This ensures that lists in speaker notes don't add "fragment" classes,
which can cause additional keypresses to be needed to advance a slide.
2015-03-14 23:32:35 -07:00
John MacFarlane
3b962a5277 Properly gobble spaces after \\.
Closes #2007.
2015-03-14 23:12:04 -07:00
John MacFarlane
348b383731 LaTeX reader: allow block content in \title{}.
Closes #2001.
2015-03-14 23:11:04 -07:00
Konstantin Zudov
b9f77ed03d Support shortcut reference links in markdown writer
Issue #1977

Most markdown processors support the [shortcut format] for reference links.
Pandoc's markdown reader parsed this shortcuts unoptionally.
Pandoc's markdown writer (with --reference-links option) never shortcutted links.

This commit adds an extension `shortcut_reference_links`. The extension is
enabled by default for those markdown flavors that support reading shortcut
reference links, namely:

    - pandoc
    - strict pandoc
    - github flavoured
    - PHPmarkdown

If extension is enabled, reader parses the shortcuts in the same way as
it preveously did. Otherwise it would parse them as normal text.

If extension is enabled, writer outputs shortcut reference links unless
doing so would cause problems (see test cases in `tests/Tests/Writers/Markdown.hs`).
2015-03-10 20:32:24 +02:00
John MacFarlane
2e1e76394a Merge pull request #2000 from bosmacs/org-smart
Org reader: add support for smart punctuation
2015-03-09 09:03:10 -07:00
Craig S. Bosma
513221f822 Org reader: add support for smart punctuation 2015-03-09 07:11:53 -05:00
John MacFarlane
c7c45918dc Merge pull request #1999 from synsem/latex-reader-tables
LaTeX reader: minor table parsing improvements
2015-03-08 10:37:29 -07:00
Mathias Schenner
12bf0ff3e5 LaTeX reader: allow non-empty colsep in tables
The `tabular` environment allows non-empty column separators
with the "@{...}" syntax. Previously, pandoc would fail to
parse tables if a non-empty colsep was present. With this
commit, these separators are still ignored, but the table gets
parsed. A test case is included.
2015-03-08 15:47:39 +01:00
Mathias Schenner
1e3ef0e36f LaTeX reader: allow valign argument in tables
The `tabular` environment takes an optional parameter for
vertical alignment. Previously, pandoc would fail to parse
tables if this parameter was present. With this commit,
the parameter is still ignored, but the table gets
parsed. A test case is included.
2015-03-08 15:39:18 +01:00
Mathias Schenner
4f9a10619f LaTeX reader: add some test cases for simple tables 2015-03-08 15:17:09 +01:00
John MacFarlane
efdc1691fa LaTeX reader: ignore options in \lstinline.
Rather than raising a parse error.  Closes #1997.
2015-03-07 19:58:49 -08:00
Nikolay Yakimov
59c4d28d8c Docx Writer: Tables test 2015-03-08 04:42:50 +03:00
Nikolay Yakimov
c0c9b313e6 Docx Writer: set firstRow information in tables 2015-03-08 04:42:23 +03:00
Nikolay Yakimov
a82dedf1ff Lists test 2015-03-08 03:59:48 +03:00
John MacFarlane
0b42eb5f58 MediaWiki writer: spaces to underscores in wikilink URL.
This mimics MediaWiki itself.  Closes #1982.
2015-03-07 10:58:56 -08:00
John MacFarlane
48eaadc57f Fixed pipe tables -- headerless tables are not allowed.
GFM and PHP Markdown Extra pipe tables require headers.
Previously pandoc allowed pipe tables not to include headers,
and produced headerless pipe tables in Markdown output, but this
was based on a misconception about pipe table syntax. This
commit fixes this.

Note:  If you have been using headerless pipe tables, this may
cause existing tables to break.

Closes #1996.
2015-03-07 10:40:13 -08:00
John MacFarlane
62e802ae1e Merge pull request #1976 from wcaleb/json-help-message
Clarify JSON input and output in usage message
2015-03-07 10:08:13 -08:00
John MacFarlane
4d52269709 Merge pull request #1988 from sumitsahrawat/issue-969
Fix issue #969, #1779 by providing --latex-engine-opt
2015-03-07 10:06:22 -08:00
Sumit Sahrawat
ad9e4cde9d Fix issue #969, #1779 by providing --latex-engine-opt 2015-03-04 15:25:56 +05:30
Nikolay Yakimov
ae07d5ed49 Initial tests for writer 2015-03-03 14:37:02 +03:00
Nikolay Yakimov
65c80822e7 Code cleanup 2015-03-03 13:08:52 +03:00
Matthew Pickering
7407b83ced Merge pull request #1980 from RyanGlScott/master
Bump blaze-html and blaze-markup upper version bounds
2015-03-02 14:47:10 +00:00
Nikolay Yakimov
409111f647 Started moving StyleMap out of writer code 2015-03-01 22:57:35 +03:00
Nikolay Yakimov
13daf3ed6a Update Docx writer for 1cb601d reference.docx 2015-03-01 18:49:44 +03:00
Nikolay Yakimov
1cb601d288 Update reference.docx
Following styles are set as custom:
* Author
* Abstract
* Compact
* Image Caption
* Table Caption
* Definition Term
* Definition
* First Paragraph

Following styles are renamed to correspond with Word Normal.dotm
* Block Quote -> Block Text
* Link -> Hyperlink
* Footnote Ref -> Footnote Reference

Following styles added:
* Caption

Following styles' inheritance changed:
* Image Caption <- Caption
* Table Caption <- Caption
2015-03-01 18:45:19 +03:00
RyanGlScott
d649acc146 Bump blaze-html and blaze-markup upper version bounds 2015-02-28 16:55:23 -06:00
Caleb McDaniel
6b6c9e8c66 Clarify JSON input and output in usage message 2015-02-27 11:29:33 -06:00