Age | Commit message (Collapse) | Author | Files | Lines |
|
[odt] images parser
|
|
|
|
Previously we required 0.5.
Remove CPP conditionals for earlier versions.
|
|
This reverts commit 3f82471355286d33f2d73329c29a51c47bf76ad7.
We might want to revert the requirement of http-client 0.5,
as this is not yet in Stackage and that is starting to
cause problems. I can't recall why it is there.
|
|
The `linesToBlock` function takes a list of lines and combines them by appending
a hard `LineBreak` to each line and concatenating the result, putting the result
it into a `Para`. This is most useful when dealing when converting `LineBlock`
elements.
|
|
Highly influenced by the docx support, refactored
some code to avoid DRY.
|
|
Our lower bound on http-client is 0.5, and both of these min_version
tests are less than 0.5, so they will always pass.
|
|
This was only necessary for GHC versions with base below 4.5
(i.e., ghc < 7.4).
|
|
|
|
Previously we parsed a list of dates, took the first one, and then
tested its year range. That meant that if the first one failed, we
returned nothing, regardless of what the others did. Now we test for
sanity before running `msum` over the list of Maybe values. Anything
failing the test will be Nothing, so will not be a candidate.
|
|
We only allow years between 1601 and 9999, inclusive. The ISO 8601
actually says that years are supposed to start with 1583, but MS Word
only allows 1601-9999. This should stop corrupted word files if the date
is out of that range, or is parsed incorrectly.
|
|
We want to avoid illegal dates -- in particular years with greater than
four digits. We attempt to parse series of digits first as `%Y%m%d`, then
`%Y%m`, and finally `%Y`.
|
|
|
|
|
|
|
|
This is a lossy function for converting `[Block] -> [Inline]`. Its main
use, at the moment, is for docx comments, which can contain arbitrary
blocks (except for footnotes), but which will be converted to spans.
This is, at the moment, pretty useless for everything but the basic
`Para` and `Plain` comments. It can be improved, but the docx reader
should probably emit a warning if the comment contains more than this.
|
|
|
|
Closes #2737.
|
|
This avoids performance problems in documents with many identically
named headers.
Closes #2671.
|
|
Closes #2605.
|
|
Added threefold wrapping option.
* Command line option: deprecated `--no-wrap`, added
`--wrap=[auto|none|preserve]`
* Added WrapOption, exported from Text.Pandoc.Options
* Changed type of writerWrapText in WriterOptions from
Bool to WrapOption.
* Modified Text.Pandoc.Shared functions for SoftBreak.
* Supported SoftBreak in writers.
* Updated tests.
* Updated README.
Closes #1701.
|
|
The Haskell URI parsing routines will accept "C:" as a scheme,
so we rule that out manually.
This helps with `--self-contained` and absolute Windows paths.
See
http://stackoverflow.com/questions/33899126/rchart-in-markdown-doesnt-render-due-to-invalidurlexception-from-pandoc
|
|
mb21-new-image-attributes
* Bumped version to 1.16.
* Added Attr field to Link and Image.
* Added `common_link_attributes` extension.
* Updated readers for link attributes.
* Updated writers for link attributes.
* Updated tests
* Updated stack.yaml to build against unreleased versions of
pandoc-types and texmath.
* Fixed various compiler warnings.
Closes #261.
TODO:
* Relative (percentage) image widths in docx writer.
* ODT/OpenDocument writer (untested, same issue about percentage widths).
* Update pandoc-citeproc.
|
|
|
|
Don't use custom prelude for latest ghc.
This is a better approach to making 'stack ghci' and 'cabal repl'
work. Instead of using NoImplicitPrelude, we only use the custom
prelude for older ghc versions. The custom prelude presents a
uniform API that matches the current base version's prelude.
So, when developing (presumably with latest ghc), we don't
use a custom prelude at all and hence have no trouble with ghci.
The custom prelude no longer exports (<>): we now want to
match the base 4.8 prelude behavior.
|
|
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
|
|
This is needed for ghci to work with pandoc, given that we
now use a custom prelude.
Closes #2503.
|
|
|
|
* CPP around deprecated `parseTime`.
* Text.Pandoc.Compat.Locale -> Text.Pandoc.Compat.Time,
now exports Data.Time.
|
|
- The (non-exported) prelude is in prelude/Prelude.hs.
- It exports Monoid and Applicative, like base 4.8 prelude,
but works with older base versions.
- It exports (<>) for mappend.
- It hides 'catch' on older base versions.
This allows us to remove many imports of Data.Monoid
and Control.Applicative, and remove Text.Pandoc.Compat.Monoid.
It should allow us to use -Wall again for ghc 7.10.
|
|
HTML, LaTeX writers adjusted.
The special characters are '<','>','|','"','{','}','[',']','^', '`'.
Closes #1640, #2377.
|
|
`src/Text/Pandoc/Shared.hs`, so that all Writers can access this variable
without importing `src/Text/Pandoc.hs`, preventing circular import.
* pandoc.hs: Import pandocVersion from `Text.Pandoc.Shared`.
* src/Text/Pandoc.hs: Remove the definition of pandocVersion
and relevant import.
* src/Text/Pandoc/Shared.hs: Add the definition of pandocVersion
and relevant import.
|
|
|
|
|
|
Closes #2105.
|
|
|
|
(mb21)
|
|
The issue was originally reported by CasperVector as
https://github.com/gentoo-haskell/gentoo-haskell/issues/427
Mainfests itself as a builg failure full of missing zip-archive
names:
src/Text/Pandoc/Shared.hs:756:49:
Not in scope: type constructor or class ‘Archive’
src/Text/Pandoc/Shared.hs:777:38: Not in scope: ‘toEntry’
src/Text/Pandoc/Shared.hs:786:19:
Not in scope: ‘toArchive’
Perhaps you meant ‘mbArchive’ (line 778)
Included Codec.Archive.Zip unconditionally.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
Fully implemented features:
* Paragraphs
* Headers
* Basic styling
* Unordered lists
* Ordered lists
* External Links
* Internal Links
* Footnotes, Endnotes
* Blockquotes
Partly implemented features:
* Citations
Very basic, but pandoc can't do much more
* Tables
No headers, no sizing, limited styling
|
|
This avoids a deprecation warning.
|
|
Fixes a bug with `--section-divs`, where the final references section
added by pandoc-citeproc, enclosed in its own div, got put in the
div for the section previous to it.
This fixes #2294. Longer term, we might think about how hierarchicalize
should interact with Div elements.
|
|
|
|
Now they are constructed on the fly from their components,
but we now allow them to be printed with `--print-default-data-file`
and to override the defaults if placed in the user data directory.
Shared now exports getDefaultReferenceDocx and getDefaultReferenceODT
(API change).
These functions have been removed from the Docx and ODT writers.
Shared.readDataFile has been modified so that requests to read
a reference.odt or reference.docx will use these functions to
generate the files.
|
|
* Instead of defining readmeFile in Text.Pandoc.Data (which we forgot
to export anyway), we simply add a record for "README" to the
`dataFiles` lookup table. This allows simplifying some of the code
for `readDefaultDataFile` in SHared.
* As a bonus, `pandoc --print-default-data-file README` now works.
|
|
This change adds `--man1` and `--man5` options to pandoc, so
pandoc can generate its own man pages.
It removes the old overly complex method of building a separate
executable (but not installing it) just to create the man pages.
The man pages are no longer automatically created in the build
process.
The man/ directory has been removed. The man page templates
have been moved to data/.
New unexported module: Text.Pandoc.ManPages.
Text.Pandoc.Data now exports readmeFile, and `readDataFile`
knows how to find README.
Closes #2190.
|
|
This is a crude workaroud for #2183.
A correct fix would require having openURL and fetchItem return
a content encoding as well as a content type.
|
|
|
|
|
|
Fixes #1801
|
|
|