Commit graph

3605 commits

Author SHA1 Message Date
John MacFarlane
6b5302e063 Markdown reader: Support RST-style line blocks.
This depends on the new Ext_line_blocks extension.
2013-01-13 12:34:18 -08:00
John MacFarlane
0598cf0fee Moved lineBlockLines to Parsing.
This will be used by both RST and markdown readers.
2013-01-13 11:39:32 -08:00
John MacFarlane
b92b8e8a3d RST reader: Refactored line block parser. 2013-01-13 11:29:00 -08:00
John MacFarlane
a2c93c5a33 RST writer: Allow soft breaks w continuations in line blocks. 2013-01-13 11:15:51 -08:00
John MacFarlane
5c067bb457 RST reader: Line block improvements.
* Use nonbreaking spaces for initial indent (otherwise lost in HTML and
  LaTeX).
* Allow multiple paragraphs in a single line block.
2013-01-13 11:15:31 -08:00
John MacFarlane
5ecadd7bfa Use line block in RST writer when a paragraph contains linebreaks.
Previously linebreaks weren't supported in RST, since RST
has no native linebreak construct.
2013-01-13 09:25:56 -08:00
John MacFarlane
15829d5c3a Markdown writer: Support Ext_auto_identifiers and Ext_header_attributes. 2013-01-12 22:44:01 -08:00
John MacFarlane
c8022f0419 HTML reader: Added html5 tags to list of block-level tags. 2013-01-12 12:23:15 -08:00
John MacFarlane
70e308f2f9 Escape | as \vert in LaTeX math.
This avoids a clash with highlighting-kate's macros, which
redefine | as a short verbatim delimiter.  Thanks to
Björn Peemöller for raising this issue.
2013-01-12 10:21:19 -08:00
John MacFarlane
f2aa5fd661 Fixed/simplified diff output for tests. 2013-01-12 10:21:07 -08:00
John MacFarlane
f07ce6fead Changed hspace in last commit to 0.333em.
This seems to match the spacing of ~ exactly.
2013-01-11 20:44:39 -08:00
John MacFarlane
c29a1942d0 LaTeX writer: Use \hspace* for nonbreaking space after line break.
Since `~` spaces after a line break are just ignored.
Closes #687.
2013-01-11 20:40:00 -08:00
John MacFarlane
98bc0d17ab Revised EPUB writer given changes in header attributes.
We need to ensure that all headers have attributes, since
this is no longer guaranteed by hierarchicalize.
Explicitly given headers remain the same.
2013-01-11 17:07:25 -08:00
John MacFarlane
f3f3638f21 EPUB writer: Download images at URLs. 2013-01-11 17:07:04 -08:00
John MacFarlane
449ddeb53b Refactoring:
* Shared now exports fetchItem (instead of getItem) and openURL
* fetchItem has different parameters than getItem and includes
  some logic formerly in the ODT and Docx writers
* getItem still used in SelfContained
2013-01-11 16:19:06 -08:00
John MacFarlane
8f7beb6d10 ODT, Docx writers: Properly handle URL refs for images.
These images are now downloaded instead of being ignored (as
used to happen in the docx reader) or causing an error (as
used to happen in the odt reader).
2013-01-11 15:45:19 -08:00
John MacFarlane
acfe1d96ee pandoc.hs: Fix writerSourceDirectory when a URL is provided.
It should be the URL up to the path.
2013-01-11 15:44:50 -08:00
John MacFarlane
1cc4e7db52 ImageSize: Remove no longer exported readImageSize. 2013-01-11 15:44:16 -08:00
John MacFarlane
2a0ed1c433 Improvements to docx writer.
Avoid reading image files again when we've already processed them.
2013-01-11 13:41:17 -08:00
John MacFarlane
4e4c3537e0 Docx writer: Preliminary improvements.
* Use getItem to fetch images, so we can get them over the net
  if they have absolute URLs.
* Added TODO notes for cleaning up the logic.
2013-01-11 12:17:41 -08:00
John MacFarlane
2685ebff0f ImageSize: Use strict, not lazy bytestrings. 2013-01-11 12:11:37 -08:00
John MacFarlane
77d9ead1b2 Move getItem from SelfContained to Share; export getItem. 2013-01-11 11:30:31 -08:00
John MacFarlane
97a3cb2e86 Options: Added githubMarkdownExtensions.
Added github_markdown as input/output option.
2013-01-11 10:11:53 -08:00
John MacFarlane
791763d09f Added markdown_phpextra as writer option. 2013-01-10 22:43:02 -08:00
John MacFarlane
f8db21fa16 Options: Added phpMarkdownExtraExtensions.
And added markdown_phpextra input/output format.
2013-01-10 22:39:47 -08:00
John MacFarlane
23ab5ffcb0 Implemented Ext_header_attributes.
This allows explicit attributes to be put on headers, using
a syntax like that for code blocks:

  {#id .class .class k=v k=v}
2013-01-10 20:32:53 -08:00
John MacFarlane
1a7686ad79 Ext_header_identifiers -> Ext_auto_identifiers. 2013-01-10 19:58:39 -08:00
John MacFarlane
cf4cd2ccb0 More improvements in emailAddress parser. 2013-01-09 21:32:42 -08:00
John MacFarlane
a71641a2a0 Made email parser more correct.
Now it's based on RFC 822, though it still doesn't implement
quoted strings in email addresses.
2013-01-09 17:19:32 -08:00
John MacFarlane
0998f774ce Fixed regression in example lists.
This was associated with e1be934dc2.
2013-01-09 15:54:39 -08:00
John MacFarlane
d599c4cdab Added Attr field to Header.
Previously header ids were autogenerated by the writers.
Now they are generated (unless supplied explicitly) in the
markdown parser, if the `header_identifiers` extension is
selected.

In addition, the textile reader now supports id attributes on
headers.
2013-01-09 09:30:05 -08:00
John MacFarlane
7a40fa8c08 Biblio: Make sure mvPunc and deNote run on metadata too.
This fixed a bug with notes on titles using footnote styles.
2013-01-08 17:24:18 -08:00
John MacFarlane
d1ebde08a9 Added / to the list of letters that can occur in a citation key. 2013-01-08 10:04:40 -08:00
John MacFarlane
8ff81dc9ca Updated tests for tight/loose lists.
Taking into account new context/latex output, and fixing
some bugs in the test suite Tests.Helpers and Tests.Writers.ConTeXt.
(We had the wrong order of expected/actual in the diff output.)
2013-01-07 20:58:49 -08:00
John MacFarlane
1a9193c30d Implemented tight lists in context, latex writers. 2013-01-07 20:12:13 -08:00
John MacFarlane
7909982f9a Shared: export isTightList. 2013-01-07 20:12:05 -08:00
John MacFarlane
8c48bd8feb Don't put the text of an autolink in Code font. 2013-01-06 20:51:51 -08:00
John MacFarlane
300f8528da Mediawiki reader: interpret HTML in verbatim contexts as text.
Thanks to Jeff Runningen for reporting that mediawiki works
this way.
2013-01-06 19:35:40 -08:00
John MacFarlane
4d1c82de9e Docx writer: Use rIdNN identifiers for r:embed in images. 2013-01-06 19:07:35 -08:00
John MacFarlane
73f464b8cd reference.docx: PictureCaption style -> ImageCaption.
This was a typo originally.
Thanks to Huashan Chen.
2013-01-06 18:58:38 -08:00
John MacFarlane
fabb843c9a README: Changed description of markdown_attribute extension. 2013-01-06 16:56:20 -08:00
John MacFarlane
c7f4333f83 UTF8 module: Remove \r when reading.
This should prevent problems with extra CRs on windows.
2013-01-06 16:35:59 -08:00
John MacFarlane
f779411fe2 Docx writer: Use separate footnotes.xml for notes.
This seems to help LibreOffice convert the file, even though
it was valid docx before.

Note that the references in notes must be in
word/_rels/footnotes.xml.rel.  We handle this now by simply
making that file contain all the references in
word/_rels/document.xml.rel.  Something better could be done
eventually, but this works.

Closes #637.
2013-01-06 12:26:44 -08:00
John MacFarlane
7d74a916ff Updated table tests for latex writer changes. 2013-01-05 20:03:50 -08:00
John MacFarlane
dd6dab45fb LaTeX tables: Use minipage rather than parbox for block containers.
This allows verbatim code to be included in grid tables.
Closes #663.
2013-01-05 19:12:41 -08:00
John MacFarlane
4343f0dbcd Implemented --toc-depth (and --toc!) for RTF writer. 2013-01-05 18:23:51 -08:00
John MacFarlane
65d01857fb Support --toc-depth in context writer. 2013-01-05 18:15:34 -08:00
John MacFarlane
f9799c2a42 For epub3, use epub:type to mark footnotes and footnote refs.
This yields nice popup footnotes in iBooks.  See
http://www.pigsgourdsandwikis.com/2012/05/creating-pop-up-footnotes-in-epub-3-and.html
2013-01-05 17:18:43 -08:00
John MacFarlane
0cc9504796 EPUB changes.
* Epub writer now exports writeEPUB, not writeEPUB2 and writeEPUB3.
* Options now exports EPUBVersion
* WriterOptions now includes writerEpubVersion.
2013-01-05 13:00:12 -08:00
John MacFarlane
ea3eaaa553 Implemented --toc-depth for markdown writer. 2013-01-05 12:31:15 -08:00