Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Add copyright block to T.P.R.Docx.Reducible.
|
|
|
|
Docx rewrite and cleanup (in terms of Reducible typeclass)
|
|
This used to be fixed in the tree-walking. We need to make sure we're doing it
right now.
|
|
|
|
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.
|
|
Improve normalization
|
|
|
|
|
|
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.
|
|
Add torture-test for new normalization functions.
One problem that this test demonstrates is that word has a tendency to
turn off formatting at a space, and then turn it back on after. I'm not
sure yet whether this is something we should fix.
|
|
There were some problems with the old str normalization. This fixes those
problems. Also, since it drills down on its own, it only needs to be
mapped over the blocks, not walked over the tree.
|
|
|
|
Previously pandoc would say that a filter was not found,
even in a case where the filter had a syntax error.
|
|
Docx reader tests: Introduce NoNormPandoc type.
|
|
This is just a wrapper around Pandoc that doesn't normalize with
`toString`. We want to make sure that our own normalization process
works. If, in the future, we are able to hook into the builder's
normalization, this will be removed.
|
|
`<span style="font-variant:small-caps;">foo</span>` will be
parsed as a `SmallCaps` inline, and will work in all output
formats that support small caps.
Closes #1360.
|
|
The opening "{{" must be followed by an alphanumeric or ':'.
This prevents the exponential slowdown in #1033.
Closes #1033.
|
|
|
|
Notes can't contain figures in LaTeX, so we fake it to avoid
an error. Closes #1053.
|
|
When the `hard_line_breaks` option was specified, pandoc would
produce a spurious line break after a tight list item. This
patch solves the problem. Closes #1137.
|
|
in exif header. Closes #1358.
|
|
We let a `</table>` tag close an open `<tr>` or `<td>`.
Closes #1167.
|
|
|
|
Previously strikeout highlighted code caused an error.
|
|
Make strNormalize go bottomUp.
|
|
This was how it used to be before it was folded into blockNormalize.
|
|
Docx reader: Fixes to block Normalization
|
|
`normalize` from Text.Pandoc.Shared is more general. In tests, though,
it more than doubles the run time. `strNormalize` does less, but it does
what we need. This comment is added for future maintainability.
|
|
Previously DefinitionList had been left out of `blockNormalize`. Now it
is included.
|
|
Use a function `stripSpaces`, instead of recursion. Makes it a bit
easier to read and mantain, and simplify normalizing DefinitionList,
which was left out the first time.
|
|
`blockNormalize` previously forgot to account for the case in which a
Header's inlines did not start with a space.
|
|
Otherwise we get overly tall lines when there are empty
table cells and the other cells are compact.
Closes #1353.
|
|
Test case:
```
<table border="1">
<colgroup>
<col> </col>
<col></col>
</colgroup>
<tbody>
<tr>
<td>X</td>
<td>Y</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
</tr>
</tbody>
</table>
```
|
|
Parse literal tabs in docx
|
|
|
|
This previously allowed spaces at the beginning of a paragraph.
|
|
This will help take care of spaces introduced at the beginning of strings.
|
|
|
|
|
|
Some images seem to have tag type of 256, which was causing
a runtime error.
|
|
This change to highlighting-kate means that PHP fragments no longer
need to start with `<?php`. Closes #1271.
|
|
Add ReaderOptions to the docx tests
|
|
This will allow for testing different media embedding (in addition to
any other applicable options.)
|
|
Avoids interpretation as list.
|