Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
Use this also in Tests.Old.
|
|
* 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.
|
|
|
|
It's having trouble figuring out HasQuoteContext.
|
|
Since we've unified error types, we can just throw the same error at
the toplevel.
|
|
|
|
|
|
|
|
Make it all state. This will make it easier to set things.
|
|
We don't have a good way to set things that aren't in the common
state. That will be the next order of business.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We'll want these in a number of places, but right now it will be
necessary for the macros in T2T.
|
|
|
|
This is to enable macros in T2T, but can be used for other stuff in the
future, I imagine.
This requires building up the info in our fake file trees. Note the
version in IO is safe.
|
|
|
|
We can remove this if we can figure out a better way to do this.
|
|
|
|
This will be unified with Text.Pandoc.Error eventually. But I'm building
it out here so as not to interfere with other modules that might be
using the error module currently.
|
|
|
|
This was left over from when the pure function was called runTest.
|
|
|
|
Right now, the io warnings both print to stderr and write to the
state. That can be easily modified.
We also add a getWarnings function which pulls warnings out of the state
for instances of PandocMonad.
|
|
|
|
For now I just replaced occurences of Reader with Reader IO,
so nothing is really different.
When we move readers into instances of PandocMonad, though,
we can change things here so that the readers will work
with any instance of PandocMonad.
|
|
|
|
|
|
|
|
OPML writer should note include `_notes` attribute when there's
no content.
|
|
|
|
The recent changes made the writer fail with an error if it
encountered a header with level 5. Better to do as we did
before and just print a paragraph in that case. Eventually
we should emit a warning here.
|
|
|
|
|
|
|
|
We had primed versions of all the Writer types and getWriter
functions, as we transitioned. Now that we're using the new ones
exclusively, we'll get rid of the old ones, and get rid of the primes in
the names.
|
|
Errors can be thrown purely with `throwError`. At the moment there are
only three kinds of errors:
1. PandocFileReadError FilePath (for problems reading a file from the
filesystem)
2. PandocShouldNeverHappenError String (for stuff that should never
happen but we need to pattern-match anyway)
3. PandocSomeError String (a grab bag of everything else)
Of course, we need to subdivide the third item in this list.
|
|
Since PandocMonad is an instance of MonadError, this will allow us, in a
future commit, to change all invocations of `error` to `throwError`,
which will be preferable for the pure versions. At the moment, we're
disabling the lua custom writers (this is temporary).
This requires changing the type of the Writer in Text.Pandoc. Right now,
we run `runIOorExplode` in pandoc.hs, to make the conversion easier. We
can switch it to the safer `runIO` in the future.
Note that this required a change to Text.Pandoc.PDF as well. Since
running an external program is necessarily IO, we can be clearer about
using PandocIO.
|
|
This requires a default environment. The state variables are pretty
straightforward. The env variables are a little trickier. I'm just
making most of them empty for now. Note that some of them (like
defaultReferenceDocx/ODT) will be coming out soon anyway.
|
|
Until we fix fetchItem and fetchItem' to make use of MonadError, we have
to thow an exception. We'll throw PandocFileReadError. Note that this is
temporary.
|