Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously only `markdown` worked.
Note: currently a raw block labeled `markdown_github` will
be printed for any `markdown` format.
|
|
Now we raise a proper error on template failure.
|
|
This gives 20-30% speedup and reduction of memory
usage in most of the writers.
|
|
Closes #3736.
|
|
* 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.
|
|
E.g. we don't want `<strong></strong>` to become `****`.
Similarly for emphasis, super/subscript, strikeout.
Closes #3715.
|
|
With `--reference-location` of `section` or `block`, pandoc
will now repeat references that have been used in earlier
sections.
The Markdown reader has also been modified, so that *exactly*
repeated references do not generate a warning, only
references with the same label but different targets.
The idea is that, with references after every block,
one might want to repeat references sometimes.
Closes #3701.
|
|
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.
|
|
with `--reference-links` and `--reference-location=section`.
Also ensure that there are no empty link references `[]`.
Closes #3674.
|
|
This follows the suggestions given by the FSF for GPL licensed software.
<https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
|
|
|
|
Previously the Markdown writer would sometimes create links where there
were none in the source. This is now avoided by selectively escaping bracket
characters when they occur in a place where a link might be created.
Closes #3619.
|
|
Fixes #3630 (#3631).
Previously the attributes in link reference definitions did not have a space preceding.
|
|
Ensure that we do not generate reference links
whose labels differ only by case.
Also allow implicit reference links when the link
text and label are identical up to case.
Closes #3615.
|
|
Closes #3529.
|
|
...unless unicode super/subscripted characters are available.
|
|
We now handle a few non digit characters (+, -, =, parentheses)
for which there are superscripted unicode characters.
Closes #3518.
|
|
|
|
|
|
* Previously we got overlong lists with `--wrap=none`. This is fixed.
* Previously a multiline list could become a simple list (and would
always become one with `--wrap=none`).
Closes #3384.
|
|
after tables and list, for example.
|
|
Closes #3487.
|
|
to avoid false interpretation as a list.
Also handle `|`, and refactor code for escaping `%`.
Closes #3497.
|
|
E.g. an HTML table with two cells in the first row and one
in the second (but no row/colspan).
We now calculate the number of columns based on the longest
row (or the length of aligns or widths).
Closes #3337.
|
|
Now we properly escape things that would otherwise start ordered
lists, such as
---
title: 1. inline
...
Closes #3492.
Closes #1685.
|
|
...if the `pandoc_title_blocks` extension is enabled.
Otherwise in a document starting with a literal percent sign
the first line is wrongly interpreted as a title.
Closes #3454.
|
|
Added test cases.
Fixed HTML reader to parse a span with class "smallcaps" as
SmallCaps.
Fixed Markdown writer to render SmallCaps as a native span
when native spans are enabled.
|
|
Instead of a style attribute as before.
See #1592.
|
|
|
|
|
|
Closes #2834.
|
|
|
|
Previously variables set on the command line were included in
e.g. YAML metadata, contrary to documentation and intentions.
|
|
|
|
|
|
Moved unsmartify to Writers.Shared.
|
|
* Text.Pandoc.Writers.HTML: removed writeHtml, writeHtmlString,
added writeHtml4, writeHtml4String, writeHtml5, writeHtml5String.
* Removed writerHtml5 from WriterOptions.
* Renamed default.html template to default.html4.
* "html" now aliases to "html5"; to get the old HTML4 behavior,
you must now specify "-t html4".
|
|
This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
|
|
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.
|
|
Thus, to "unsmartify" something that has been parsed as
smart by pandoc, you can use `-t markdown+smart`, and
straight quotes will be produced instead of curly quotes,
etc.
Example:
% pandoc -f latex -t markdown+smart
``hi''---ok
^D
"hi"---ok
|
|
|
|
Other writers still TBD.
|
|
* Remove exported module `Text.Pandoc.Readers.TeXMath`
* Add exported module `Text.Pandoc.Writers.Math`
* The function `texMathToInlines` now lives in `Text.Pandoc.Writers.Math`
* Export helper function `convertMath` from `Text.Pandoc.Writers.Math`
* Use these functions in all writers that do math conversion.
This ensures that warnings will always be issued for failed
math conversions.
|
|
|
|
Errors can be thrown purely with `throwError`. At the moment there are
only three kinds of errors:
1. PandocFileReadError FilePath (for problems reading a file from the
filesystem)
2. PandocShouldNeverHappenError String (for stuff that should never
happen but we need to pattern-match anyway)
3. PandocSomeError String (a grab bag of everything else)
Of course, we need to subdivide the third item in this list.
|
|
Since PandocMonad is an instance of MonadError, this will allow us, in a
future commit, to change all invocations of `error` to `throwError`,
which will be preferable for the pure versions. At the moment, we're
disabling the lua custom writers (this is temporary).
This requires changing the type of the Writer in Text.Pandoc. Right now,
we run `runIOorExplode` in pandoc.hs, to make the conversion easier. We
can switch it to the safer `runIO` in the future.
Note that this required a change to Text.Pandoc.PDF as well. Since
running an external program is necessarily IO, we can be clearer about
using PandocIO.
|
|
Update all writers to take into account page breaks.
A straightforwad, far from complete, implementation of page
breaks in selected writers.
Readers will have to follow in the future as well.
|
|
Closes #3298.
|
|
Previously pandoc would sometimes wrap lines too early
due to this bug.
Closes #3277.
|
|
Previously setting writerStandalone = True did nothing unless
a template was provided in writerTemplate. Now a fragment
will be generated if writerTemplate is Nothing; otherwise,
the specified template will be used and standalone output
generated. [API change]
|