Commit graph

929 commits

Author SHA1 Message Date
Jesse Rosenthal
4d1d8a4b6f Docx test: Test image from media bag. 2014-07-30 22:32:55 -04:00
Jesse Rosenthal
b24b328906 Docx tests: Add test image.
This is the cow image extracted from `docx.image.docx`.
2014-07-30 22:32:27 -04:00
Jesse Rosenthal
16f88edb3b Docx tests: Added media test comparison function.
Also tell pandoc.cabal that we'll be needing base64, since we want to
compare strings here.
2014-07-30 22:31:38 -04:00
John MacFarlane
3e26fb517d Updated RTF writer tests. 2014-07-30 15:30:51 -07:00
Jesse Rosenthal
941df1b0de Docx reader: change tests to make use of media bag. 2014-07-30 12:46:53 -04:00
John MacFarlane
8c2ed54e2e LaTeX writer: use \(..\) instead of $..$ for inline math.
Closes #1464.
2014-07-29 20:45:49 -07:00
John MacFarlane
8d4eebaff4 Merge pull request #1463 from jkr/metadata
Make metadata out of styled pars
2014-07-29 11:15:34 -07:00
Jesse Rosenthal
54708da371 Add and update docx tests in pandoc.cabal. 2014-07-29 13:05:19 -04:00
Jesse Rosenthal
840108a9c1 Docx reader: Make metavalues out of styled paragraphs.
This will make paragraphs styled with `Author`, `Title`, `Subtitle`,
`Date`, and `Abstract` into pandoc metavalues, rather than text. The
implementation only takes those elements from the beginning of the
document (ignoring empty paragraphs).

Multiple paragraphs in the `Author` style will be made into a metaList,
one paragraph per item. Hard linebreaks (shift-return) in the paragraph
will be maintained, and can be used for institution, email, etc.
2014-07-29 13:03:01 -04:00
John MacFarlane
c302ab3133 Markdown writer: More improvements to 'plain' output, updated tests.
Math now appears in unicode if possible, without the distracting
italics around identifiers.

Blank lines around headers are more consistent.

Footnotes appear in regular [n] style.
2014-07-27 07:57:23 -07:00
Matthew Pickering
e340a7da02 Txt2Tags Reader: Added tests 2014-07-27 00:12:57 +01:00
John MacFarlane
18f4490482 Fixed runtime error with compactify'DL on certain lists.
Closes #1452.  Added test.
2014-07-25 10:53:04 -07:00
John MacFarlane
9c3f7688ee DocBook reader: Better handle elements inside code environments.
Of course, we can't include structure in the code block, but
this way we at least preserve the text.  Closes #1449.
2014-07-23 10:06:36 -07:00
John MacFarlane
98c7ada061 HTML reader: parse Div and Span elements even without --parse-raw.
Closes #1434.
2014-07-20 21:43:54 -07:00
John MacFarlane
4af8eed764 Markdown reader: revised definition list syntax (closes #1429).
* This change brings pandoc's definition list syntax into alignment
  with that used in PHP markdown extra and multimarkdown (with the
  exception that pandoc is more flexible about the definition markers,
  allowing tildes as well as colons).

* Lazily wrapped definitions are now allowed; blank space is required
  between list items; and the space before definition is used to
  determine whether it is a paragraph or a "plain" element.

* For backwards compatibility, a new extension,
  `compact_definition_lists`, has been added that restores the behavior
  of pandoc 1.12.x, allowing tight definition lists with no blank space
  between items, and disallowing lazy wrapping.
2014-07-20 16:33:59 -07:00
John MacFarlane
87096c64f8 Org reader: text adjacent to a list yields a Plain, not Para.
This gives better results for tight lists.  Closes #1437.

An alternative solution would be to use Para everywhere, and
never Plain.  I am not sufficiently familiar with org to know
which is best.  Thoughts, @tarleb?
2014-07-20 12:56:01 -07:00
John MacFarlane
0f01421f81 AsciiDoc writer: Double markers in intraword emphasis.
Closes #1441.
2014-07-20 12:24:53 -07:00
Craig S. Bosma
1bb4f0c497 Org reader: Respect :exports header arguments on code blocks
Adds support to the org reader for conditionally exporting either the code block,
results block immediately following, both, or neither, depending on the value
of the `:exports` header argument. If no such argument is supplied, the default
org behavior (for most languages) of exporting code is used.
2014-07-17 10:23:22 -05:00
John MacFarlane
047f9b3714 Merge pull request #1430 from jkr/anchor-fix-2
Fix auto identified headers when already auto-id'ed
2014-07-15 20:27:28 -07:00
John MacFarlane
c24ab14918 LaTeX writer: Use \nolinkurl in email autolinks.
This allows them to be styled using `\urlstyle{tt}`.

Thanks to Ulrike Fischer for the solution.
2014-07-15 16:42:39 -07:00
Jesse Rosenthal
643435f1de Docx reader: Add test
Test auto ident header anchors with pandoc-generated pandoc.
2014-07-15 18:32:19 +01:00
John MacFarlane
3e95fd586d Use raw HTML for complex block quotes.
As far as I can see, dokuwiki markup is pretty limited in what
can go in a `>` block quote:  just a single line of paragraph
text.  (#1398)
2014-07-13 16:15:45 -07:00
John MacFarlane
81088281de DokuWiki writer: Use raw HTML for complex lists...
as in the mediawiki writer.  The dokuwiki markup isn't able
to handle multiple block-level items within a list item, except
in a few special cases (e.g. code blocks, and these must be started
on the same line as the preceding paragraph).  So we fall back to
raw HTML for these.

Perhaps there is a better solution.  We can "fake" multiple
paragraphs within list items using hard line breaks (`\\`), but
we must keep everything on one line.

(#1398)
2014-07-13 16:04:29 -07:00
John MacFarlane
0ba2f0b8f9 DokuWiki writer: Normalize to collapse adjacent raw HTML blocks. 2014-07-13 15:48:01 -07:00
John MacFarlane
15956fcac7 DokuWiki writer: Updated tests. 2014-07-13 15:45:59 -07:00
John MacFarlane
5df812f7eb Merge branch 'claremacrae-dokuwiki'.
Use removeFormatting from Shared instead of the custom unfancy
function.
2014-07-13 14:44:53 -07:00
John MacFarlane
ff86702a95 Added failing test for issue #1121. 2014-07-10 14:23:20 -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
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
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
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
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
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
John MacFarlane
3fbbafd391 Rewrote normalize for efficiency. (Closes #1385.)
* Added normalizeInlines, normalizeBlocks.
* Type signature is now more narrow, `Pandoc -> Pandoc` instead of
  `Data a :: a -> a`.  Some users may need to change their uses of
  `normalize` to the newly exported `normalizeInlines` or
  `normalizeBlocks`.
2014-06-29 23:05:08 -07:00
Jesse Rosenthal
1405e7b709 Docx reader: Add tests for hanging indent handline.
We want to treat it as a plain paragraph if the hanging amount is
greater to or equal to the left indent---i.e., if the first line has
zero indentation. But we still want it to be a block quote if it starts
to the right of the margin. Someone might format verse with wrapping
lines with a hanging indent, for example.
2014-06-29 23:37:00 -04:00
Clare Macrae
fdbf52b1cc Updated DokuWiki code and tests to work with latest code from jgm.
The new code was got from inspecting changes in MediaWiki.hs

This slightly changes the output of Div blocks, but I'm not 
convinced the original behaviour was really correct anyway.

The code for handling Span does nothing for now, until I can 
work out the desired behaviour, and add tests for it.
2014-06-29 21:15:17 +01:00
Clare Macrae
717e16660d Merge remote-tracking branch 'jgm/master' into dokuwiki 2014-06-29 19:22:31 +01:00
Jesse Rosenthal
7fb74d88fb Update docx tests to reflect new expected behavior
Now doing auto ids for all headers, so tests should reflect that.
2014-06-28 17:47:00 -04:00
Jesse Rosenthal
b152145d6d Change test result to match new behavior. 2014-06-28 04:00:17 -04:00
Jesse Rosenthal
afdc0af779 Track changes tests. 2014-06-25 16:13:59 -04:00