Commit Graph
10211 Commits
Author SHA1 Message Date
Yuchen Pei f09473eab7 minor updates to vimwiki reader. (#3759)
- updated comments in Vimwiki.hs to reflect current status of
implementation
- added vimwiki to trypandoc
2017-06-26 08:41:51 +02:00
Alexander Krotov 492b3b1291 Muse reader: fix horizontal rule parsing (#3762)
Do not parse 3 dashes as horizontal rule and allow whitespace after rule
2017-06-26 08:41:17 +02:00
Alexander Krotov b95f391beb Muse reader: simplify para implementation (#3761) 2017-06-26 08:40:53 +02:00
John MacFarlane 4cbbc9dd58 BCP47: split toLang from getLang, rearranged types. 2017-06-25 23:16:55 +02:00
John MacFarlane d0d2443f2e Refactored ConTeXt writer to use BCP47.
BCP47 - consistent case for BCP47 fields (e.g. uppercase
for region).
2017-06-25 21:56:29 +02:00
John MacFarlane ac9423eccc Moved BCP47 specific functions from Writers.Shared to new module.
Text.Pandoc.BCP47 (unexported, internal module).
`getLang`, `Lang(..)`, `parseBCP47`.
2017-06-25 21:00:35 +02:00
John MacFarlane 643cbdf104 Writers.Shared: improve type of Lang and bcp47 parser.
Use a real parsec parser for BCP47, include variants.
2017-06-25 18:31:59 +02:00
John MacFarlane a85d833576 Fixed log message for InvalidLang. 2017-06-25 15:52:30 +02:00
John MacFarlane e7cd3cb466 Writers.Shared: refactored getLang, splitLang...
into `Lang(..)`, `getLang`, `parceBCP47`.
2017-06-25 15:36:30 +02:00
John MacFarlane 3ae4105d14 Fixed support for lang attribute in OpenDocument and ODT writers.
This improves on the last commit, which didn't work in
some important ways.

See #1667.
2017-06-25 13:49:40 +02:00
John MacFarlane 083a224d1e Support lang attribute in OpenDocument and ODT writers.
This adds the required attributes to the temporary styles,
and also replaces existing language attributes in styles.xml.

Support for lang attributes on Div and Span has also been
added.

Closes #1667.
2017-06-25 12:46:26 +02:00
John MacFarlane a02f08c9fc Added InvalidLang to LogMessage. 2017-06-25 12:46:26 +02:00
John MacFarlane 0c993a6c7b Text.Pandoc.Writers.Shared: export splitLang. 2017-06-25 12:46:26 +02:00
John MacFarlane 87e6235fe7 Text.Pandoc.Writers.Shared: added getLang. 2017-06-25 10:37:49 +02:00
John MacFarlane 3b3ae54a39 Makefile: split 'make haddock' from 'make full'. 2017-06-25 10:06:19 +02:00
Alexander Krotov f8877516e0 Muse reader: Require space before and after '=' for code (#3758) 2017-06-25 10:01:43 +02:00
John MacFarlane 743419af5c Readers.getReader, Writers.getWriter API change.
Now these functions return a pair of a reader/writer and an
Extensions, instead of building the extensions into the
reader/writer.  The calling code must explicitly set
readerExtensions or writerExtensions using the Extensions
returned.

The point of the change is to make it possible for the
calling code to determine what extensions are being used.

See #3659.
2017-06-24 13:47:10 +02:00
John MacFarlane dd8f086a2c Makefile: improved 'make full'.
- Disable optimizations.
- Build everything, inc. trypandoc and benchmarks.
- Use parallel build.
2017-06-24 13:46:40 +02:00
John MacFarlane a9259c1501 Extensions: Monoid instance for Extensions.
[API change]
2017-06-24 13:20:42 +02:00
John MacFarlane a20302d9cf Added comment in source. 2017-06-23 22:36:43 +02:00
John MacFarlane 5812ac0390 Markdown reader: interpret YAML metadata as Inlines when possible.
If the metadata field is all on one line, we try to interpret
it as Inlines, and only try parsing as Blocks if that fails.

If it extends over one line (including possibly the `|` or
`>` character signaling an indented block), then we parse as
Blocks.

This was motivated by some German users finding that

    date: '22. Juin 2017'

got parsed as an ordered list.

Closes #3755.
2017-06-23 22:31:08 +02:00
John MacFarlane 310ff99a8c INSTALL: Improved instructions for tests with patterns. 2017-06-23 13:09:47 +02:00
John MacFarlane 57cc9a391c Markdown writer: make sure plain, markdown_github, etc. work for raw.
Previously only `markdown` worked.

Note: currently a raw block labeled `markdown_github` will
be printed for any `markdown` format.
2017-06-23 11:51:44 +02:00
John MacFarlane da7d9ef295 HTML writer: make sure html4, html5 formats work for raw blocks/inlines. 2017-06-23 11:51:26 +02:00
John MacFarlane 595d81bf54 Added note on output formats in docs for raw_attribute. 2017-06-23 11:36:13 +02:00
John MacFarlane 2108275ae7 trypandoc Makefile: fixed web destination in upload. 2017-06-23 11:17:45 +02:00
John MacFarlane 2b34337a9c Text.Pandoc.Extensions: Added Ext_raw_attribute.
Documented in MANUAL.txt.

This is enabled by default in pandoc markdown and multimarkdown.
2017-06-23 00:37:13 +02:00
John MacFarlane 4a6868885d EPUB writer: put title_page.xhtml in text/. 2017-06-22 12:42:21 +02:00
John MacFarlane 2b3e8cb718 EPUB writer: Fixed various things with new EPUB structure. 2017-06-22 12:38:08 +02:00
John MacFarlane 24d215acf5 Added --epub-subdirectory option.
This specifies the subdirectory in the OCF container that
holds the EPUB specific content.

Closes #3720.
2017-06-22 12:01:33 +02:00
John MacFarlane 379b99f63a Added writerEpubSubdirectory to WriterOptions.
[API change]

The EPUB writer now takes its EPUB subdirectory from this option.

Also added `PandocEpubSubdirectoryError` to `PandocError`.
This is raised if the EPUB subdirectory is not all ASCII
alphanumerics.

See #3720.
2017-06-22 11:43:50 +02:00
John MacFarlane 242e2a064f Change default EPUB directory structure in OCF container.
See #3720.
We now put all EPUB related content in an EPUB/ subdirectory
by default (later this will be configurable).

    mimetype
    META-INF/
      com.apple.ibooks.display-options.xml
      container.xml
    EPUB/ <<--configurable-->>
      fonts/ <<--static-->>
      font.otf
    media/ <<--static-->>
      cover.jpg
      fig1.jpg
    styles/ <<--static-->>
      stylesheet.css
    content.opf
    toc.ncx
    text/ <<--static-->>
      ch001.xhtml
2017-06-21 23:54:16 +02:00
John MacFarlane 6e6324bade Removed an 'error' bomb. 2017-06-20 22:44:09 +02:00
John MacFarlane c349f0b0ba Writers: adjusted for renderTemplate' changes.
Now we raise a proper error on template failure.
2017-06-20 22:43:48 +02:00
John MacFarlane 21c4281b13 Odt reader: replaced collectRights with rights from Data.Either. 2017-06-20 22:43:06 +02:00
John MacFarlane c0a1286025 Text.Pandoc.Templates: change type of renderTemplate'.
Now it runs in PandocMonad and raises a proper
PandocTemplateError if there are problems, rather
than failing with uncatchable 'error'.
2017-06-20 22:41:56 +02:00
John MacFarlane 8f8f505fd4 Text.Pandoc.Error: added PandocTemplateError. 2017-06-20 22:41:34 +02:00
John MacFarlane 2363e6a15b Move CR filtering from tabFilter to the readers.
The readers previously assumed that CRs had been filtered
from the input.  Now we strip the CRs in the readers themselves,
before parsing.  (The point of this is just to simplify the
parsers.)

Shared now exports a new function `crFilter`. [API change]
And `tabFilter` no longer filters CRs.
2017-06-20 21:52:13 +02:00
John MacFarlane 4ba5ef46ae Updated code example. 2017-06-20 21:25:39 +02:00
John MacFarlane 5ec84bfeb4 Text.Pandoc.Lua - added DeriveDataTypeable for ghc 7.8. 2017-06-20 21:11:21 +02:00
Albert Krewinkel f4c12606e1 Lua: use registry to store function references
Using the registry directly instead of a custom table is cleaner and
more efficient. The performance improvement is especially noticable when
filtering on frequent elements like Str.
2017-06-20 20:51:10 +02:00
Albert Krewinkel bd5a7e5258 Lua: apply hslint suggestions 2017-06-20 19:20:50 +02:00
John MacFarlane 9ac0a99292 Added mention of vimwiki raeder more places. 2017-06-20 16:57:39 +02:00
John MacFarlane 429c4620df Removed redundant import. 2017-06-20 16:44:05 +02:00
John MacFarlane 32f86067ec App: issue proper errors instead of using 'error'. 2017-06-20 16:19:59 +02:00
John MacFarlane b78afbd980 Text.Pandoc.Lua: throw LuaException instead of using 'error'.
Text.Pandoc.App: trap LuaException and issue a PandocFilterError.
2017-06-20 16:19:59 +02:00
Alexander Krotov 2192528424 Muse reader: check that headers start at the first column (#3749) 2017-06-20 14:48:00 +02:00
John MacFarlane ea1724e35e Docbook, JATS, TEI writers: print INFO message when omitting interior header.
This only applies to section headers inside list items, e.g.,
which were otherwise silently omitted.

See #3750.
2017-06-20 14:22:19 +02:00
John MacFarlane b26d3c4522 FB2 writer: don't fail with an error on interior headers (e.g. in list).
Instead, omit them with an INFO message.

Closes #3750.
2017-06-20 14:21:43 +02:00
John MacFarlane 6a077ac9c7 Fixed footnotes in table captions.
Note that if the table has a first page header and a
continuation page header, the notes will appear only
on the first occurrence of the header.

Closes #2378.
2017-06-20 11:21:32 +02:00