Commit graph

1080 commits

Author SHA1 Message Date
John MacFarlane
743b680649 Merge branch 'master' of github.com:jgm/pandoc 2015-03-28 13:10:32 -07:00
John MacFarlane
c6aaeb3c4f Fixed typo in lhs-test.html. 2015-03-28 13:02:59 -07:00
John MacFarlane
b74af6762d Merge branch 'mpickering-errortype' 2015-03-28 12:15:09 -07:00
John MacFarlane
6f4018f8d3 Fixed lhs writer tests (overflow-x, not x-overflow). 2015-03-28 12:13:27 -07:00
John MacFarlane
6a3a04c428 Merge branch 'errortype' of https://github.com/mpickering/pandoc into mpickering-errortype
Conflicts:
	benchmark/benchmark-pandoc.hs
	src/Text/Pandoc/Readers/Markdown.hs
	src/Text/Pandoc/Readers/Org.hs
	src/Text/Pandoc/Readers/RST.hs
	tests/Tests/Readers/LaTeX.hs
2015-03-28 12:12:48 -07:00
John MacFarlane
5f74db8605 Updated tests for new highlighting-kate behavior. 2015-03-28 10:10:33 -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
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
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
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
Craig S. Bosma
513221f822 Org reader: add support for smart punctuation 2015-03-09 07:11:53 -05: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
Nikolay Yakimov
59c4d28d8c Docx Writer: Tables test 2015-03-08 04:42:50 +03:00
Nikolay Yakimov
a82dedf1ff Lists test 2015-03-08 03:59:48 +03: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
Nikolay Yakimov
ae07d5ed49 Initial tests for writer 2015-03-03 14:37:02 +03:00
John MacFarlane
9a5e081073 Markdown writer: Avoid introducing spurious list items through wrapping.
Closes #1946.
2015-02-25 10:16:05 -08:00
Jesse Rosenthal
9654514e8a Docx reader: add test for verbatim in sub/superscript. 2015-02-21 08:45:38 -05:00
Jesse Rosenthal
2995526772 Docx reader: Add tests for new list style parsing. 2015-02-19 00:24:04 -05:00
Matthew Pickering
1a7a99161a Update tests 2015-02-18 21:09:07 +00:00
John MacFarlane
3480189e8e ICML writer: Better handling of raw blocks and inlines.
Previously these were always escaped and printed verbatim.
Now they are ignored unless the format is "icml", in which
case they are passed through unescaped.

Closes #1951.
2015-02-17 08:50:48 -08:00
Jesse Rosenthal
616e211f36 Docx reader: test lists in table cells. 2015-02-13 09:08:07 -05:00
John MacFarlane
12962e2332 Merge pull request #1927 from freephile/master
update syntax for Images/Media files in MediaWiki
2015-02-07 20:33:33 -08:00
John MacFarlane
bd7cf8dbd5 Merge branch 'patch/fixTexinfoWrap' of https://github.com/timtylin/scholdoc into timtylin-patch/fixTexinfoWrap
Conflicts:
	src/Text/Pandoc/Writers/Texinfo.hs
2015-02-07 20:28:56 -08:00
Tim Lin
858ebf99eb Texinfo writer: fix wrapping by using breakable spaces 2015-02-06 01:16:40 -08:00
Greg Rundlett
13c4757057 update syntax for Images/Media files in MediaWiki
The preferred syntax for Images and other media is [[File:Foo.jpg]] in MediaWiki since v1.14 (2008).  [[Image:Foo.jpg]] is deprecated but still works as an alias to the File namespace.
2015-02-05 17:03:20 -05:00
Tim Lin
0c18f3a854 Append newline to the LineBreak of various writers
This change improves output formatting of content with a large amount of force line breaks, such as line-blocks. The following writers are affected:

* Dokuwiki
* HTML
* EPUB (via HTML)
* LaTeX
* MediaWiki
* OpenDocument
* Texinfo

This commit resolves #1924
2015-02-04 22:42:22 -08:00
John MacFarlane
6a0d4da382 HTML writer: Add "inline" or "display" class to math spans.
This allows inline and display math to be styled differently.

Closes #1914.
2015-02-01 11:08:27 -08:00
John MacFarlane
33d1c8cc01 Merge pull request #1885 from mb21/html-reader-tables
fixes HTML Reader: tables
2015-01-25 10:46:47 -08:00
mb21
b40d33b174 fixes #1859 HTML Reader table parsing 2015-01-25 09:41:12 +01:00
Jesse Rosenthal
e88119f2d1 Docx Reader: Add test for VML images.
Since images are often visually (not structurally) placed on the page,
people might not always get the results they're looking for here.
2015-01-21 13:41:16 -05:00
John MacFarlane
fcd1599b09 FB2 writer: Add newline to output. 2014-12-15 22:14:29 -08:00
John MacFarlane
0eb3f8cff2 HTML writer: put newline btw img and caption paragraph. 2014-12-15 21:49:16 -08:00
John MacFarlane
a5cac0a0c4 Don't treat a citation as a reference link label.
Closes #1763.
2014-12-15 10:54:12 -08:00
John MacFarlane
47c360e079 Improved texorpdfstring patch #1148.
* Make LaTeX reader recognize texorpdfstring.
* Don't use texorpdfstring unless it's actually needed.
* Fix tests.
2014-12-15 10:06:03 -08:00
John MacFarlane
544f3e5b45 Merge branch 'use-texorpdfstring' of https://github.com/wilx/pandoc into wilx-use-texorpdfstring
Conflicts:
	src/Text/Pandoc/Writers/LaTeX.hs
	tests/Tests/Writers/LaTeX.hs
2014-12-15 10:01:50 -08:00
John MacFarlane
a864e9a348 Merge pull request #1805 from bergey/rst
RST Reader - Improved Role Support
2014-12-15 09:06:45 -08:00
John MacFarlane
9e75b9b84b DocBook readers: Include id on section headers.
Closes #1818.
2014-12-14 23:46:25 -08:00
John MacFarlane
1d3ca088f2 Merge pull request #1813 from tarleb/file-links
Org reader: properly handle links to `file:target`
2014-12-14 13:36:34 -08:00
Albert Krewinkel
4d85b17fc5 Org reader: properly handle links to file:target
Org links like `[[file:target][title]]` were not handled correctly,
parsing the link target verbatim.  The org reader is changed such that
the leading `file:` is dropped from the link target.

This is related to issues #756 and #1812.
2014-12-14 21:30:10 +01:00
John MacFarlane
2b08e32a90 Fixe autolinks with following punctuation.
Closes #1811.
The price of this is that autolinked bare URIs can no longer
contain `>` characters, but this is not a big issue.
2014-12-14 12:20:33 -08:00
Daniel Bergey
689fb112bf RST Reader: compute Attrs when role is defined
Move recursive role lookup from renderRole to addNewRole.  The Attr value
will be the same for every occurance of this role, so there's no reason
to compute it every time.  This allows simplifying the
stateRstCustomRoles map considerably.

We could go even further, and remove the fmt and attr arguments to
renderRole, which are null except for custom roles.
2014-12-12 14:45:45 +00:00
Daniel Bergey
4e040160e0 WIP: tests for RST roles 2014-12-12 14:45:45 +00:00
John MacFarlane
4ffa70970d Merge pull request #1695 from bjornbm/master
Escape inline verbatim spaces in LaTeX output
2014-12-10 09:07:46 -08:00
Bryan O'Sullivan
2150903230 DocBook reader: document/test "type" as implemented 2014-12-08 23:17:27 -08:00
Bryan O'Sullivan
aaf93d8f4e Fix test suite 2014-12-08 23:16:21 -08:00
Bryan O'Sullivan
fe1d147187 DocBook reader: add support for classname 2014-12-08 23:12:06 -08:00