John MacFarlane
4349097990
LaTeX reader: Better support for citation commands.
...
* Make `\cite` etc. an AuthorInText.
* Make `\footcite` etc. into citations in notes.
2012-10-10 19:41:39 -07:00
John MacFarlane
31435ad3f5
RST reader: Don't create empty definition list for metadata field lists.
...
Previously a field list consisting only of metadata fields (author,
title, date) would be parsed as an empty DefinitionList, which is not
legal in LaTeX and not needed in any format. This patch fixes the
problem, which I learned of from
http://stackoverflow.com/questions/12762767/modify-variable-in-rst-with-pandoc .
2012-10-06 20:07:32 -07:00
John MacFarlane
b617cce95b
Biblio: Changed type of processBiblio.
...
* It is no longer in the IO monad.
* setHash uses state rather than Data.Unique.
* It takes a Style argument rather than parameters for CSL
and abbrev filenames.
* pandoc.hs now calls the functions to parse the style file
and add abbrevs.
2012-10-06 09:51:23 -07:00
John MacFarlane
1b68dc3405
Revert "Added stateWarnings to ParserState, added warning function."
...
This reverts commit 5419b504ce
.
2012-10-05 19:38:43 -07:00
John MacFarlane
5419b504ce
Added stateWarnings to ParserState, added warning function.
...
This will be used to provide warnings for things like duplicate
footnote refs and link refs.
2012-10-05 19:25:26 -07:00
John MacFarlane
f232034ab0
Textile reader: Implemented comment blocks.
2012-10-05 10:23:15 -07:00
John MacFarlane
b1dafe8750
Fixed typo.
2012-10-04 09:24:28 -07:00
John MacFarlane
eea4c9e4d3
Updated mediawiki writer test for <br />
change.
2012-10-04 08:36:00 -07:00
John MacFarlane
6d31d6a79f
Merge pull request #636 from byorgey/master
...
Remove newline character from LineBreak output
2012-10-04 08:33:38 -07:00
Brent Yorgey
c85d184668
Remove newline after <br/> in translation of LineBreak
...
There's no particular need for a newline (other than making the
generated MediaWiki source look nice to a human), and in fact
sometimes it is incorrect: in particular, inside an enumeration, list
items cannot have embedded newline characters.
2012-10-04 11:16:54 -04:00
John MacFarlane
3f86127f5a
Docx writer: Added nsid to abstractNum elements.
...
This helps when merging word documents with numbered or bulleted lists.
Closes #627 .
2012-10-02 19:43:18 -07:00
John MacFarlane
02bb0f051a
Use integer ids for bookmarks.
...
Closes #626 .
2012-10-02 19:20:51 -07:00
John MacFarlane
f9d76bd666
Makefile: cabal-dev/cabal update.
2012-10-02 16:38:46 -07:00
John MacFarlane
3a3fe2df6c
RST reader: Removed 'plain' in blocks, since 'para' includes it.
2012-09-30 22:08:05 -07:00
John MacFarlane
e8260c27e1
RST reader: Consolidate super/subscript, math into interpretedRole.
2012-09-30 20:28:50 -07:00
John MacFarlane
9366d8681d
RST reader: Renamed 'image' to 'subst', since it now handles more.
2012-09-30 20:18:14 -07:00
John MacFarlane
9294fc399c
Ignore unknown interpreted roles.
...
The contents are treated as rst, not literal, which will sometimes
be wrong.
2012-09-30 14:59:26 -07:00
John MacFarlane
27bd6fb977
RST reader: Removed requirement that directives begin at left margin.
...
This was (correctly) not in earlier releases; docutils doesn't
make the requirement.
2012-09-30 14:58:26 -07:00
John MacFarlane
d9f628fd18
RST reader: Require whitespace after field list field names.
2012-09-30 14:57:55 -07:00
John MacFarlane
946764ccf7
Bumped versions of json and base64-bytestring dependencies.
...
Thanks to Dirk Ullirch.
2012-09-30 11:53:18 -07:00
John MacFarlane
83ad8982e1
Make blaze_html_0_5 default to True.
2012-09-30 11:53:00 -07:00
John MacFarlane
b07ea7a02d
RST reader: Consolidated rawBlock into directive.
2012-09-30 09:59:22 -07:00
John MacFarlane
e5740a138e
RST reader: Handle replace:: and unicode:: substitutions.
2012-09-30 09:53:50 -07:00
John MacFarlane
d360172693
RST reader: Make directive labels case-insensitive.
2012-09-29 21:42:55 -07:00
John MacFarlane
779e02126d
RST reader: Folded figureBlock into directive.
2012-09-29 18:12:46 -07:00
John MacFarlane
d3b52e42eb
RST reader: Made comments a separate parser.
2012-09-29 19:35:49 -04:00
John MacFarlane
1948c55914
RST reader: Folded image block handling into directive.
2012-09-29 19:22:38 -04:00
John MacFarlane
720a7ba0fc
RST reader: Folded code block parsers into directive.
2012-09-29 17:37:38 -04:00
John MacFarlane
93600ec9b8
RST reader: Folded default-role parser into directive.
2012-09-29 17:25:14 -04:00
John MacFarlane
93e92a4716
Renamed removedLeadingTrailingSpace to trim.
...
Also removeLeadingSpace to triml,
removeTrailingSpace to trimr.
2012-09-29 17:09:34 -04:00
John MacFarlane
487d01118f
RST reader: Consolidated math block parsers into directive.
2012-09-29 16:59:41 -04:00
John MacFarlane
3a589b7bca
RST reader: Refactored directive parser.
...
We now also hander container, compound, epigraph, rubric,
highligts, pull-quote.
2012-09-29 16:22:13 -04:00
John MacFarlane
28fe9c1ae9
Adjusted pandoc.hs for changes in Biblio module.
2012-09-29 15:09:46 -04:00
John MacFarlane
c78cc02abf
Biblio: csl parameter now a string rather than a filepath.
...
API change.
2012-09-29 15:09:25 -04:00
John MacFarlane
b75a5b631b
Markdown reader: Worked around some sepBy's.
2012-09-29 11:57:32 -04:00
John MacFarlane
c416ff98bc
UTF8: Removed unneeded imports.
2012-09-29 09:56:47 -04:00
John MacFarlane
ae68836352
Textile reader: Avoid parsing dashes as strikeout.
...
Previously the input
text--
text--
text--
text--
would be parsed with strikeouts rather than dashes. This fixes
the problem by requiring that a strikeout delimiting - not be
followed by a -.
Closes #631 .
2012-09-28 23:37:41 -04:00
John MacFarlane
632fd49d07
Textile reader: Fixed bug affected words ending in hyphen.
...
Note: sepBy1 doesn't work quite as I expected. It gives odd
results if sep succeeds but not p.
2012-09-28 23:29:54 -04:00
John MacFarlane
d6ddc2ff61
Textile: Improvements to surround and symbol.
2012-09-28 23:01:41 -04:00
John MacFarlane
2fbdf9e002
RST reader: Support ".. code::".
2012-09-28 22:20:31 -04:00
John MacFarlane
58909aaf21
RST reader: Combine para/plain.
2012-09-28 22:14:03 -04:00
John MacFarlane
4b65c2041c
Makefile: Use Hackage citeproc-hs 0.3.5.
2012-09-28 21:57:37 -04:00
John MacFarlane
3abc1021aa
HTML writer: Use toHtml instead of pre-escaping.
...
We work around the problem that blaze-html unnecessarily escapes `'`
by pre-escaping just the `'` characters, instead of the whole string.
If blaze-html later stops escaping `'` characters, we can simplify
strToHtml to toHtml.
Note that this change yields a significant speed boost (111ms to 94ms
on one benchmark).
Closes #629 .
2012-09-28 11:11:31 -04:00
John MacFarlane
4be137509e
RST reader: Made para parser slightly more efficient.
2012-09-28 00:59:05 -04:00
John MacFarlane
ab17faf497
RST reader: Use Text.Pandoc.Builder.
...
This will give us more flexibility in the future.
It also gives built-in normalization. Performance slightly
better.
2012-09-27 17:52:48 -07:00
John MacFarlane
5c06322ab2
Shared: Export compactify', formerly in Markdown reader.
2012-09-27 17:52:38 -07:00
John MacFarlane
7633d51971
Parsing: Changed type of stateSubstitutions to use Inlines.
2012-09-27 16:44:49 -07:00
John MacFarlane
35662e14a9
Removed nullBlock.
...
Don't use nullBlock in Textile reader. Better to know about parsing
problems than to skip stuff when we get stuck.
2012-09-27 16:06:29 -07:00
John MacFarlane
731415a4e5
RST reader: Support :target: on image substitutions.
2012-09-27 15:40:09 -07:00
John MacFarlane
1be27ffb3a
Added stateSubstitutions to ParserState, use for RST substitutions.
2012-09-27 15:20:29 -07:00