Age | Commit message (Collapse) | Author | Files | Lines |
|
This is refactored out from the Markdown writer.
IT can be used in other writers to create a generic TOC.
|
|
(unexported module). These are used in both the man and ms
writers.
Moved groffEscape out of Text.Pandoc.Writers.Shared [cancels earlier
API change from adding it, which was after last release].
This fixes strong/code combination on man (should be `\f[CB]` not
`\f[BC]`), mentioned in #4973.
Updated tests.
Closes #4975.
|
|
This wasn't necessary.
|
|
Closes #4750.
Text.Pandoc.Writers.Shared now exports hasSimpleCells [API change].
|
|
Previously, the writer would unconditionally emit HTMLish output for
subscripts, superscripts, strikeouts (if the strikeout extension is
disabled) and small caps, even with raw_html disabled.
Now there are plain-text (and, where possible, fancy Unicode)
fallbacks for all of these corresponding (mostly) to the Markdown
fallbacks, and the HTMLish output is only used when raw_html is
enabled.
This commit adds exported functions `toSuperscript` and
`toSubscript` to `Text.Pandoc.Writers.Shared`. [API change]
Closes #4528.
|
|
Remove exported functions `metaValueToInlines`, `metaValueToString`.
Add new exported functions `lookupMetaBool`, `lookupMetaBlocks`,
`lookupMetaInlines`, `lookupMetaString`.
Use these whenever possible for uniformity in writers.
API change (major, because of removed function `metaValueToInlines`.
`metaValueToString` wasn't in any released version.)
|
|
[API change]
|
|
Moved groffEscape function to Text.Pandoc.Writers.Shared.
[API change, since T.P.W.S is exported.]
|
|
Closes #4826. This isn't a complete solution, since other
nestings of display math may still cause problems, but it should
work for what is by far the most common case.
Note that this also involves an API change: `isDisplayMath`
is now exported from Text.Pandoc.Writers.Shared.
|
|
This seems to be necessary if we are to use our custom Prelude
with ghci.
Closes #4464.
|
|
|
|
* Annotate gridTable code with comments and abstract small functions
* Don't wrap lines in tables when `--wrap=none`. Instead, expand cells, even if
it results in cells that don't respect relative widths or surpass page column width.
* This change affects RST, Markdown, and Haddock writers.
|
|
+ Whitespace is ignored at the beginning and end of emphasis, as per
<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup>.
+ Export `stripLeadingTrailingSpace` from `Text.Pandoc.Writers.Shared`.
|
|
This will allow the Powerpoint writer to use it as well.
|
|
|
|
See #2252.
This also changes fixDisplayMath from Text.Pandoc.Writers.Shared
so that it no longer produces empty Para as an artifact.
(That was the original reason the writer omitted them.)
|
|
|
|
|
|
Previously they would be transmitted to the template without
any escaping.
Note that `--M title='*foo*'` yields a different result from
---
title: *foo*
---
In the latter case, we have emphasis; in the former case, just
a string with literal asterisks (which will be escaped
in formats, like Markdown, that require it).
Closes #3792.
|
|
Previously we left these.
|
|
|
|
Text.Pandoc.BCP47 (unexported, internal module).
`getLang`, `Lang(..)`, `parseBCP47`.
|
|
Use a real parsec parser for BCP47, include variants.
|
|
into `Lang(..)`, `getLang`, `parceBCP47`.
|
|
|
|
|
|
Previously a String was needed as argument; now any ToJSON
instance will do.
API change.
|
|
This follows the suggestions given by the FSF for GPL licensed software.
<https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
|
|
This might help with #3526.
At any rate, it fixes another bug (see test/command/3526.md).
|
|
|
|
|
|
Uses the new gridTable in Writers.Shared, which is here
improved to better handle 0-width cells.
Closes #3516.
|
|
|
|
|
|
|
|
|
|
It was previously not allowing multiple values to become lists.
|
|
This allows us to add the variables AFTER using the metadata
to generate a YAML header (in the Markdown writer).
Addresses the problem shown by
https://travis-ci.org/jgm/pandoc/jobs/205154181#L705
See #3439
|
|
Now we handle metadata first, then variables.
This way, meta-json variable will not contain representations of
variables, only proper metadata.
|
|
|
|
Moved unsmartify to Writers.Shared.
|
|
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]
|
|
In Writers.Shared, we strip leading and trailing spaces for display
math. Since SoftBreak's are treated as spaces, we should strip those
too.
|
|
This contains a JSON version of all the metadata, in the
format selected for the writer.
So, for example, to get just the YAML metadata, you can
run pandoc with the following custom template:
$meta-json$
Closes #2019. The intent is to make it easier for static
site generators and other tools to get at the metadata.
|
|
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
|
|
This is needed for ghci to work with pandoc, given that we
now use a custom prelude.
Closes #2503.
|
|
|
|
|
|
|
|
|