Age | Commit message (Collapse) | Author | Files | Lines |
|
Later we may want to include a map of URLs and mime type, bytestring
pairs in pure state to serve as a fake internet.
|
|
Made changes where these are used, so that the version
of fetchItem from PandocMonad can be used instead.
|
|
Removed fetchItem and fetchItem'.
Provide fetchItem in PandocMonad (it uses openURL and readFileStrict).
TODO:
- PandocPure instance for openURL.
- Fix places where fetchItem is used so that we trap the
exception instead of checking for a Left value. (At least
in the places where we want a warning rather than a failure.)
|
|
Not used anywhere.
|
|
* Removed normalize, normalizeInlines, normalizeBlocks
from Text.Pandoc.Shared. These shouldn't now be necessary,
since normalization is handled automatically by the Builder
monoid instance.
* Remove `--normalize` command-line option.
* Don't use normalize in tests.
* A few revisions to readers so they work well without normalize.
|
|
We don't need these, since the default docx and odt can be
retrieved using `readDataFile datadir "reference.docx"` (or odt).
|
|
|
|
Do we need this? I don't see why.
There's a name clash which would better be avoided.
|
|
|
|
This makes it similar to the other readers -- even
though ReaderOptions is essentially ignored, the uniformity
is nice.
|
|
|
|
|
|
|
|
|
|
* Text.Pandoc.Options.WriterOptions: removed writerReferenceDocx
and writerReferenceODT, replaced them with writerReferenceDoc.
This can hold either an ODT or a Docx. In this way, writerReferenceDoc
is like writerTemplate, which can hold templates of different
formats. [API change]
* Removed `--reference-docx` and `--reference-odt` options.
* Added `--reference-doc` option.
|
|
Signature of pipeProcess has changed: the return value is
now IO (ExitCode, ByteString) -- with only stdout. Stderr
is just inherited from the parent.
This means that stderr from filters will now be streamed
as the filters are run.
Closes #2729.
|
|
|
|
|
|
Other writers still TBD.
|
|
|
|
- Added getCommonState, putCommonState, getsCommonState, modifyCommonState
to PandocMonad interface.
- Removed MonadState CommonState instances.
|
|
|
|
|
|
|
|
This will avoid the need for lift.
|
|
After all, we have warning if you don't want the source pos info.
|
|
that normally need escaping in LaTeX.
|
|
|
|
|
|
|
|
Just skip other options for now.
|
|
TODO: handle the options (see comment in code).
See #223.
|
|
There are two states in PandocPure, but it is only easy to deal with
CommonState. In the past, to do state monad operations on
PureState (the state specific to PandocPure) you had to add (lift
. lift) to the monadic operation and then rewrap in the newtype. This
adds four functions ({get,gets,put,modify}PureState) corresponding to
normal state monad operations. This allows the user to modify
PureState in PandocPure without worrying about where it sits in the
monad stack or rewrapping the newtype.
|
|
This was left over from when they were part of an environment.
|
|
Don't print program name in either case.
Print [warning] for warnings.
|
|
|
|
|
|
|
|
It now lives in IO and gives a proper message + exit
instead of calling 'error'.
We shouldn't be making it easier for people to raise error on
pure code. And this is better for the main application
in IO.
|
|
* Removed handleIncludes from LaTeX reader [API change].
* Now the ordinary LaTeX reader handles includes in a way
that is appropriate to the monad it is run in.
|
|
|
|
Removed stateWarnings, addWarning, and readWithWarnings.
|
|
We get warnings for free now from PandocM.
(And anyway, this reader doesn't generate any!)
|
|
There's already a function addWarning in Parsing!
Maybe we can dispense with that now, but I still like
'warning' better as a name.
|
|
* Renaming Text.Pandoc.Class.warn to addWarning avoids conflict
with Text.Pandoc.Shared.warn.
* Removed writeRTFWithEmbeddedImages from Text.Pandoc.Writers.RTF.
This is no longer needed; we automatically handle embedded images
using the PandocM functions. [API change]
|
|
And use this in pandoc.hs so that messages actually get printed.
|
|
|
|
* Remove exported module `Text.Pandoc.Readers.TeXMath`
* Add exported module `Text.Pandoc.Writers.Math`
* The function `texMathToInlines` now lives in `Text.Pandoc.Writers.Math`
* Export helper function `convertMath` from `Text.Pandoc.Writers.Math`
* Use these functions in all writers that do math conversion.
This ensures that warnings will always be issued for failed
math conversions.
|
|
|
|
It doesn't help to solve the problem in 7.8.
|