Age | Commit message (Collapse) | Author | Files | Lines |
|
The readers previously assumed that CRs had been filtered
from the input. Now we strip the CRs in the readers themselves,
before parsing. (The point of this is just to simplify the
parsers.)
Shared now exports a new function `crFilter`. [API change]
And `tabFilter` no longer filters CRs.
|
|
Readers: Renamed StringReader -> TextReader.
Updated tests.
API change.
|
|
|
|
This is a verison of parseFromString specialied to
ParserState, which resets stateLastStrPos at the end.
This is almost always what we want.
This fixes a bug where `_hi_` wasn't treated as emphasis in
the following, because pandoc got confused about the
position of the last word:
- [o] _hi_
Closes #3690.
|
|
|
|
Closes #3432.
|
|
|
|
|
|
This follows the suggestions given by the FSF for GPL licensed software.
<https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
|
|
The parsing functions `tableWith` and `gridTableWith` are generalized to
work with more parsers. The parser state only has to be an instance of
the `HasOptions` class instead of requiring a concrete type. Block
parsers are required to return blocks wrapped into a monad, as this
makes it possible to use parsers returning results wrapped in `Future`s.
|
|
In most cases it's better to preserve the content than
to emit it. This isn't guaranteed to have good results;
it will fail spectacularly for unknown raw or verbatim
directives.
See #3432.
|
|
Rewrote functions in RST reader and writer to avoid the need
for it.
Closes #1530.
|
|
|
|
The citations appear at the end of the document as a definition
list in a special div with id `citations`.
Citations link to the definitions.
Added stateCitations to ParserState.
Closes #853.
|
|
Closes #1166.
|
|
Cloess #3475.
|
|
Closes #2662.
|
|
See #3447. To complete fixes on this issue, we need to
do the same for the other readers. Note that the changes
required are minimal -- add reportLogMessages to the end
of the main parser, and replace report with logMessage.
(except for trace)
|
|
|
|
This is deprecated but may still be in older documents.
|
|
Currently the support for the `.. table` directive is a bit
limited; we don't yet support the `widths` field. But at least
you can have a proper captioned table.
|
|
This allows adding captions to tables.
|
|
See #3432. Previously the parser didn't handle properly this
case:
* - a
- b
* - c
- d
|
|
|
|
* We no longer add an "admonition" class, we just use the
class for the type of admonition, "note" for example.
* We put the word corresponding to the label in a paragraph
inside a div at the beginning of the admonition with class
"admonition-title".
* This is about as close as we can get to RST's own output.
See #223.
|
|
* Export readFileFromDirs from Class.
* Export insertIncludedFile from Parsing.
Simplified code in LaTeX/RST readers.
|
|
|
|
Changed signatures on Parsing.tableWith and Parsing.gridTableWith.
|
|
Now you will need to do
-f markdown+smart
instead of
-f markdown --smart
This change opens the way for writers, in addition to readers,
to be sensitive to +smart, but this change hasn't yet been made.
API change. Command-line option change.
Updated manual.
|
|
* 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.
|
|
|
|
|
|
After all, we have warning if you don't want the source pos info.
|
|
|
|
|
|
|
|
Just skip other options for now.
|
|
TODO: handle the options (see comment in code).
See #223.
|
|
|
|
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]
|
|
Since we've unified error types, we can just throw the same error at
the toplevel.
|
|
|
|
|
|
Previously the parsers failed and we got raw text.
Now we get a link with an empty URL, or empty inlines in
the case of a note or substitution.
|
|
`link <google_>`_
.. _google: https://google.com
is really a reference link.
Closes #3283.
|
|
RST requires a space before a footnote marker. We discard those spaces
so that footnotes will be adjacent to the text that comes before
it. This is in line with what rst2latex does. rst2html does not discard
the space, but its html output is different than pandoc's, so this seems
the most semantically correct approach.
Closes #3163
|
|
Markup-features focusing on lines as distinctive part of the markup are read
into `LineBlock` elements. This currently means line blocks in reStructuredText
and Markdown (the latter only if the `line_block` extension is enabled), the
`linegroup`/`line` combination from the Docbook 5.1 working draft, and Org-mode
`VERSE` blocks.
|
|
This was only necessary for GHC versions with base below 4.5
(i.e., ghc < 7.4).
|
|
Previously blockquotes were used. Now a Div is used
with class `admonition` and (if relevant) one of the
following: `attention`, `caution`, `danger`, `error`,
`hint`, `important`, `note`, `tip`, `warning`.
`sidebar` is also put into a Div.
Note: This will change rendering of RST documents!
It should provide much more flexibility.
Closes #3031.
|