Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
rST parser now supports:
- All built-in rST roles
- New role definition
- Role inheritance
Issues/TODO:
- Silently ignores illegal fields on roles
- Silently drops class annotations for roles
- Only supports :format: fields with a single format for :raw: roles,
requires a change to Text.Pandoc.Definition.Format to support multiple
formats.
- Allows direct use of :raw: role, rST only allows indirect (i.e.,
inherited use of :raw:).
|
|
Replaces long conditional chains with calls to `elem` and `notElem`.
|
|
* Moved inlineMath, displayMath from Markdown reader to Parsing.
* Export them from Parsing. (API change.)
* Generalize their types.
|
|
New type classes HasReadeOptions, HasIdentifierList, HasHeaderMap.
These allow certain common functions to be reused even in parsers
that use custom state (instead of ParserState), such as the MediaWiki
reader.
Minor API bump.
|
|
Text.Pandoc.Parsing now exports registerHeader, which can be
used in other readers.
|
|
|
|
This allows pandoc to compile with tagsoup 0.13.x.
Thanks to Dirk Ullrich for the patch.
|
|
Closes #933.
|
|
|
|
* Depend on pandoc 1.12.
* Added yaml dependency.
* `Text.Pandoc.XML`: Removed `stripTags`. (API change.)
* `Text.Pandoc.Shared`: Added `metaToJSON`.
This will be used in writers to create a JSON object for use
in the templates from the pandoc metadata.
* Revised readers and writers to use the new Meta type.
* `Text.Pandoc.Options`: Added `Ext_yaml_title_block`.
* Markdown reader: Added support for YAML metadata block.
Note that it must come at the beginning of the document.
* `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`,
`stateAuthors`, `stateDate` with `stateMeta`.
* RST reader: Improved metadata.
Treat initial field list as metadata when standalone specified.
Previously ALL fields "title", "author", "date" in field lists
were treated as metadata, even if not at the beginning.
Use `subtitle` metadata field for subtitle.
* `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string
instead of a compiled template..
* OPML template: Use 'for' loop for authors.
* Org template: '#+TITLE:' is inserted before the title.
Previously the writer did this.
|
|
|
|
- Specialize readWith to String input.
- On error have it print the line in which the error occurred,
with a caret pointing to the column.
- This should help diagnose parsing problems in LaTeX especially.
|
|
Don't treat punctuation before percent-encoding as final punctuation.
Don't treat '+' as final punctuation.
|
|
`<` is no longer allowed in URLs, according to the uri parser
in Text.Pandoc.Parsing.
Added a test case.
|
|
(Markdown reader.)
|
|
Added tests for entities in titles and links.
Closes #723.
|
|
A markdown link `<http://göogle.com>` should
be a link to http://göogle.com.
|
|
The call to toLower in ciMatch was very expensive (and very often
used), because toLower from Data.Char calls a fully unicode
aware function. This optimization avoids the call to toLower
for the most common, ASCII cases. This dramatically reduces the
speed penalty that comes from enabling the `autolink_bare_uris`
extension. The penalty is still substantial (in one test, from 0.33s
to 0.44s), but nowhere near what it used to be.
|
|
Now latex macro definitions are preserved when output is latex,
and applied when it is another format, as originally intended.
Partially addresses #730.
\providecommand is still not supported. For this we need changes
to texmath.
|
|
|
|
|
|
|
|
Not only faster but uses less memory.
|
|
The bug prevented an autolink at the end of a string (e.g.
at the end of a line block line) from counting as a link.
Closes #711.
|
|
Added tests.
|
|
|
|
oneOfStrings will now take the longest match it can in a
list of strings, so if 'foo' and 'foobar' are both included,
'foobar' will match even if 'foo' is first in the list.
|
|
* It no longer uses Network.URIs URI parser, which is too restrictive
(not allowing unicode URIs unless encoded).
* It allows many more schemes.
* It better handles punctuation so as to avoid capturing trailing
punctuation in bare URLs.
|
|
Otherwise Network.URI.parseURI fails on e.g. Chinese
URLs. Changed an incorrect test in markdown-reader-more.
|
|
This makes 's', 'l', etc. parse properly.
Formerly we had some English-centric heuristics, but they
are no longer needed now that we keep track of the last
'Str' position in state.
Closes #698.
|
|
This will be used by both RST and markdown readers.
|
|
|
|
Now it's based on RFC 822, though it still doesn't implement
quoted strings in email addresses.
|
|
Previously header ids were autogenerated by the writers.
Now they are generated (unless supplied explicitly) in the
markdown parser, if the `header_identifiers` extension is
selected.
In addition, the textile reader now supports id attributes on
headers.
|
|
|
|
It is not connected to anything yet.
|
|
Now by default pandoc will act as if link references have been defined
for all headers. So, you can do this:
# My header
Link to [My header].
Another link to [it][My header].
Closes #691.
|
|
Didn't correctly handle case where nothing is parsed.
|
|
This reverts commit 5419b504cef0cc6e1a0f3e321b2fc0a66e12db3c.
|
|
This will be used to provide warnings for things like duplicate
footnote refs and link refs.
|
|
Also removeLeadingSpace to triml,
removeTrailingSpace to trimr.
|
|
|
|
Don't use nullBlock in Textile reader. Better to know about parsing
problems than to skip stuff when we get stuck.
|
|
|
|
This reverts commit 7272735b3d413a644fd9ab01eeae8ae9cd5a925b.
|
|
Previously, UTF-8 was enforced for both input and output.
The new system:
* For input, UTF-8 is tried first; if an error is raised, the
locale encoding is tried.
* For output, the locale encoding is always used.
|
|
This reverts commit c69837adb648a479167be5e2d37279a02be8060c.
|
|
Note that system templates are stored as UTF8
and will still be read as such, even if the local encoding
is different. Text downloaded from URLs will also be treated
as UTF-8.
|
|
|