Age | Commit message (Collapse) | Author | Files | Lines |
|
This added \cite and \begin latex to the testuite output.
|
|
TODO Also implement nested blockquotes.
|
|
|
|
To avoid to pass opts explicitly around (as we
do not use it very much at the moment anyway)
|
|
|
|
|
|
For example, this fixes the display of a broken table, and
it also fixes the various HTML horizontal rules.
|
|
|
|
This gets rid of `divAttrToContainers`: an internal convenience function
which had become pretty inconvenient. Rather than converting classes and
indentations to string lists and back, we deal with the `pPr` attribute
directly.
|
|
* Added normalizeInlines, normalizeBlocks.
* Type signature is now more narrow, `Pandoc -> Pandoc` instead of
`Data a :: a -> a`. Some users may need to change their uses of
`normalize` to the newly exported `normalizeInlines` or
`normalizeBlocks`.
|
|
Fix hanging indent behavior
|
|
Here, when hanging indents are greater than or equal to left indents, we
don't set it to block quote. Such indents are frequently used in
academic bibliographies. (Thanks to Caleb McDaniel.)
|
|
This lets us keep more information about the indentation, and act
accordingly in the reader.
|
|
Docx writer: insert bookmark tags inside <w:p> tag.
|
|
This makes the header anchors in pandoc-generated ooxml match those
generated by word.
|
|
|
|
The new code was got from inspecting changes in MediaWiki.hs
This slightly changes the output of Div blocks, but I'm not
convinced the original behaviour was really correct anyway.
The code for handling Span does nothing for now, until I can
work out the desired behaviour, and add tests for it.
|
|
|
|
Previously, a fresh state was created for the purpose of updating. In
the future, when there is more than one field in the state, this
obviously won't work.
|
|
Previously, only those with an anchor got an auto id. Now, all do, which
puts it in line with pandoc's markdown extension.
|
|
|
|
Record relationship between original id and auto id, so we can fix links
after.
|
|
In preparation for auto ids.
|
|
Using pattern guard, in preparation for doing some more complicated
stuff with it (recording header anchors, so we can change them to auto
ids.)
|
|
Use PatternGuards to get rid of need for `isJust`, `fromJust`
altogether.
|
|
It only applies to headers, so we can just apply it when we make a
header.
|
|
This is a ReaderT State stack, which keeps track of some environment info, such
as the options and the docx doc. The state will come in handy in the future,
for a couple of planned features (rewriting the section anchors as auto_idents,
and hopefully smart-quoting).
|
|
See #1346.
|
|
Track changes with options
|
|
Remove some redundant ways of dealing with Maybe.
|
|
|
|
|
|
|
|
|
|
mapMaybe does the filtering for us.
|
|
This will only read the insertions, and ignore the deletions.
|
|
This is just for the Parse module, reading it into the Docx format. It
still has to be translated into pandoc.
|
|
Insertion and deletion. Dates are just strings for now.
|
|
If a block has an indentation less than or equal to zero, it should not be
treated as a block quote.
|
|
This marks the removal of the final tree-walk in the code. (Though there
is still one in the Lists module.)
|
|
This commit also fixes a problem with the previous code pushes, which
wouldn't allow code blocks to share a div.
|
|
|
|
|
|
Docx rewrite and cleanup (in terms of Reducible typeclass)
|
|
This cleans up them implementation, and cuts down on tree-walking.
Anecdotally, I've seen about a 3-fold speedup.
|
|
This will allow us to get rid of more general functions we no longer need in
the main reader.
|
|
This defines a typeclass `Reducible` which allows us to "reduce" pandoc
Inlines and Blocks, like so
Emph [Strong [Str "foo", Space]] <++> Strong [Emph [Str "bar"]], Str
"baz"] =
[Strong [Emph [Str "foo", Space, Str "bar"], Space, Str "baz"]]
So adjacent formattings and strings are appropriately grouped.
Another set of operators for `(Reducible a) => (Many a)` are also
included.
|
|
Otherwise we get curly quotes in the PDF output.
Closes #1364.
|
|
This helps when you have two minipages which can't have
blank lines between them.
See #690, #1196.
|
|
The normalizing tests revealed a problem with unformatted spaces, brought about
by `spanTrim`. This fixes by not trimming the spaces out of spans until they
are in their final form.
|