Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
* In Shared, openURL and fetchItem now return an Either, for
better error handling. (API change.)
* Better error message when fetching a URL fails with
`--self-contained`.
* EPUB writer: If resource not found, skip it, as in Docx writer.
* Closes #916.
|
|
It also brings in a large number of dependencies (http-conduit and its
dependencies), which is why for now it is an optional flag.
Closes #820.
|
|
* Text.Pandoc.Writers.Shared contains shared functions used
only in writers.
* metaToJSON now takes a WriterOptions parameter, and will
return an empty object if standalone is not specified.
|
|
|
|
Previously if you set a value both in metadata and with a variable,
they'd be combined into a list. Now the variable replaces the
value in document metadata. If many variables with the same
name are set, a list is created.
Shared: metaToJSON now has an argument for a variable list.
|
|
`defField` is like `setField`, but does nothing if the
field already has a value.
|
|
|
|
|
|
* Depend on pandoc 1.12.
* Added yaml dependency.
* `Text.Pandoc.XML`: Removed `stripTags`. (API change.)
* `Text.Pandoc.Shared`: Added `metaToJSON`.
This will be used in writers to create a JSON object for use
in the templates from the pandoc metadata.
* Revised readers and writers to use the new Meta type.
* `Text.Pandoc.Options`: Added `Ext_yaml_title_block`.
* Markdown reader: Added support for YAML metadata block.
Note that it must come at the beginning of the document.
* `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`,
`stateAuthors`, `stateDate` with `stateMeta`.
* RST reader: Improved metadata.
Treat initial field list as metadata when standalone specified.
Previously ALL fields "title", "author", "date" in field lists
were treated as metadata, even if not at the beginning.
Use `subtitle` metadata field for subtitle.
* `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string
instead of a compiled template..
* OPML template: Use 'for' loop for authors.
* Org template: '#+TITLE:' is inserted before the title.
Previously the writer did this.
|
|
|
|
Now one gets "Fetching [URL]..." for each URL fetched, but not
the full header.
|
|
|
|
Even though these are legal, Network.URI doesn't regard them
as legal in URLs. So we escape them first.
Closes #535.
|
|
|
|
This reverts commit e80116c813ecfc8cde094cddd36a3b083c108fd8.
|
|
|
|
This fixes bugs in `--self-contained` on pandoc compiled with
`embed_data_files`. The bugs affect (a) paths containing `..`, (b)
Windows, where `\` is path separator.
Closes #833.
|
|
Closes #701.
|
|
Unnumbered sections get [] for their section number.
So far only the HTML writer has been adjusted to be sensitive
to this.
If we keep this change, all the writers will need to be changed
either (a) to directly check for the "unnumbered" class, if they
do section numbering themselves, or (b) to check for a null section
number, if they use hierarchicalize.
|
|
Sec now includes a field for Attr rather than just String
(the identifier).
Note, this is an API change.
|
|
This module just exports the association list of embedded data files,
which is used by Shared.
|
|
* 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
|
|
|
|
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.
|
|
|
|
This reverts commit 84ed0f055f71f32fc2db1dbe962e83cd0bb0b5d8.
|
|
file-embed uses forward slashes as path separators, even
on Windows. So we just convert backslashes to forward
before doing a lookup.
|
|
|
|
* Added `embed_data_files` flag. (not yet used)
* Shared no longer exports `findDataFile`.
* `readDataFile` now returns a strict bytestring.
* Shared now exports `readDataFileUTF8` which returns a string like
the old `readDataFile`.
* Rewrote modules to use new data file functions and to avoid
using functions from Paths_pandoc directly.
|
|
Also removeLeadingSpace to triml,
removeTrailingSpace to trimr.
|
|
|
|
|
|
This reverts commit 7272735b3d413a644fd9ab01eeae8ae9cd5a925b.
|
|
Previously, UTF-8 was enforced for both input and output.
The new system:
* For input, UTF-8 is tried first; if an error is raised, the
locale encoding is tried.
* For output, the locale encoding is always used.
|
|
Improved removal of markdown="1" attribute in Markdow reader.
|
|
* The `--strict` option has been removed.
* Instead of using `--strict`, one can now use `strict` instead of
`markdown` as an input or output format name.
* The `--enable` and `--disable` optinos have been removed.
* It is now possible to enable or disable specific extensions
by appending them (with '+' or '-') to the writer or reader
name. For example `pandoc -f markdown-footnotes+hard_line_breaks`.
* The lhs extensions are now implemented this way, too; you can
use either `+lhs` or `+literate_haskell`.
|
|
|
|
|
|
|
|
|
|
writerEpubStylesheet, writerEpubFonts, writerReferenceODT,
writerReferenceDocx. These can now be removed as extra
parameters to the writers.
|
|
Now you can use def (which is re-exported by Text.Pandoc) instead of
defaultParserState or defaultWriterOptions. For now, these
are still defined too, so existing code need not change.
Closes #546.
|
|
|
|
This is useful for those who want to use advanced OpenType features
with xelatex/lualatex.
|
|
* The new reader is more robust, accurate, and extensible.
It is still quite incomplete, but it should be easier
now to add features.
* Text.Pandoc.Parsing: Added withRaw combinator.
* Markdown reader: do escapedChar before raw latex inline.
Otherwise we capture commands like \{.
* Fixed latex citation tests for new citeproc.
* Handle \include{} commands in latex.
This is done in pandoc.hs, not the (pure) latex reader.
But the reader exports the needed function, handleIncludes.
* Moved err and warn from pandoc.hs to Shared.
* Fixed tests - raw tex should sometimes have trailing space.
* Updated lhs-test for highlighting-kate changes.
|
|
Added normalizeDate to Text.Pandoc.Shared.
|
|
This is like splitWithIndices, but it is sensitive to distinctions
between wide, combining, and regular characters.
|
|
|