Age | Commit message (Collapse) | Author | Files | Lines |
|
Exposes a function converting which flattenes a list of blocks into a
list of inlines. An example use case would be the conversion of Note
elements into other inlines.
|
|
|
|
|
|
This adjusts the path from a file: URI in a way that is sensitive
to Windows/Linux differences. Thus, on Windows,
`/c:/foo` gets interpreted as `c:/foo`, but on Linux,
`/c:/foo` gets interpreted as `/c:/foo`.
See #4613.
|
|
This is no longer necessary since we no longer support ghc 7.8.
|
|
This seems to be necessary if we are to use our custom Prelude
with ghci.
Closes #4464.
|
|
|
|
|
|
|
|
|
|
This gives us automatic normalization, so we don't get
for example two consecutive Spaces.
|
|
This works for any input format.
|
|
also parse two-digit days, e.g. "April 20, 2017"
|
|
|
|
|
|
|
|
|
|
|
|
* Added underlineSpan builder function. This can be easily updated if needed. The purpose is for Readers to transform underlines consistently.
* Docx Reader: Use underlineSpan and update test
* Org Reader: Use underlineSpan and add test
* Textile Reader: Use underlineSpan and add test case
* Txt2Tags Reader: Use underlineSpan and update test
* HTML Reader: Use underlineSpan and add test case
|
|
Now all the guts of openURL have been put into openURL from
Class. openURL is now sensitive to stRequestHeaders in CommonState
and will add these custom headers when making a request.
It no longer looks at the USER_AGENT environment variable,
since you can now set the `User-Agent` header directly.
|
|
Previously we were losing the qutation marks in Quoted
elements. See #3958.
|
|
* readDataFile, readDefaultDataFile, getReferenceDocx,
getReferenceODT have been removed from Shared and
moved into Class. They are now defined in terms of
PandocMonad primitives, rather than being primitve
methods of the class.
* toLang has been moved from BCP47 to Class.
* NoTranslation and CouldNotLoudTranslations have
been added to LogMessage.
* New module, Text.Pandoc.Translations, exporting
Term, Translations, readTranslations.
* New functions in Class: translateTerm, setTranslations.
Note that nothing is loaded from data files until
translateTerm is used; setTranslation just sets the
language to be used.
* Added two translation data files in data/translations.
* LaTeX reader: Support `\setmainlanguage` or `\setdefaultlanguage`
(polyglossia) and `\figurename`.
|
|
|
|
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.
|
|
This gives 20-30% speedup and reduction of memory
usage in most of the writers.
|
|
* XML.toEntities: changed type to Text -> Text.
* Shared.tabFilter -- fixed so it strips out CRs as before.
* Modified writers to take Text.
* Updated tests, benchmarks, trypandoc.
[API change]
Closes #3731.
|
|
|
|
This used to live in the Markdown reader.
|
|
|
|
We also export the set of known `schemes`.
The new function replaces the function of the same name
from `Network.URI`, as the latter did not check whether a scheme is
well-known. E.g. MediaWiki wikis frequently feature pages with names
like `User:John`. These links were interpreted as URIs, thus turning
internal links into global links. This is prevented by also checking
whether the scheme of a URI is frequently used (i.e. is IANA registered
or an otherwise well-known scheme).
Fixes: #2713
Update set of well-known URIs from IANA list
All official IANA schemes (as of 2017-05-22) are included in the set of
known schemes. The four non-official schemes doi, isbn, javascript, and
pmid are kept.
|
|
This follows the suggestions given by the FSF for GPL licensed software.
<https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
|
|
Closes #3646.
|
|
Supporting two completely different libraries for fetching
from URLs makes it difficult to trap errors, because of
different error types expected from the libraries.
There's no clear reason not to build with these https-capable
libraires.
|
|
Use this instead of PandocAppError when appropriate.
Removed exit code from PandocAppError, use 1 for all.
|
|
These are caught (and lead to exit) in pandoc.hs, but
other uses of Text.Pandoc.App may want to recover in another
way.
Added PandocAppError to PandocError (API change).
This is a stopgap: later we should have a separate constructor
for each type of error.
Also fixed uses of 'exit' in Shared.readDataFile, and
removed 'err' from Shared (API change).
Finally, removed the dependency on extensible-exceptions.
See #3548.
|
|
This reverts commit 0ef1e51211cd35b1ddb54a5fe8bee4247f1e1801.
|
|
This will be used to help with #1745.
|
|
Rewrote functions in RST reader and writer to avoid the need
for it.
Closes #1530.
|
|
...not just spaces.
|
|
PDF writer: Use 'report' instead of 'warn', make it sensitive
to verbosity settings.
|
|
Now it will just raise an exception to be trapped later.
|
|
|
|
This commit enables users to specify the User-Agent
header used when pandoc requests a document from
a URL. This is done by setting an environment variable.
For instance, one can do:
USER_AGENT="..." ./pandoc -f html -t markdown http://example.com
Signed-off-by: Thenaesh Elango <thenaeshelango@gmail.com>
|
|
|
|
Changed signatures on Parsing.tableWith and Parsing.gridTableWith.
|
|
Instead, just temporarily remove notes when generating
TOC lists in HTML and Markdown (as we already did in LaTeX).
Also export deNote from Text.Pandoc.Shared.
API change in Shared and Options.WriterOptions.
|
|
|
|
Made changes where these are used, so that the version
of fetchItem from PandocMonad can be used instead.
|
|
Not used anywhere.
|
|
* 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.
|