Age | Commit message (Collapse) | Author | Files | Lines |
|
Now we raise a proper error on template failure.
|
|
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 follows the suggestions given by the FSF for GPL licensed software.
<https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
|
|
|
|
|
|
|
|
|
|
|
|
Links with # are perfectly valid according to http://orgmode.org/manual/Internal-links.html#Internal-links
|
|
The org writer was inserting two spaces after list bullets. Emacs
Org-mode defaults to a single space, so behavior is changed to reflect
this.
Closes: #3417
|
|
This comment is likely copied from RST.hs where 'refs' variable indeed exists, but makes no sense here.
|
|
|
|
This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
|
|
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.
|
|
Unprefixed numbers where used by older org-mode versions, but are no
longer supported.
|
|
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]
|
|
The writer no longer adds an extra space before footnote markers.
Fixes: #3162
|
|
The following markup features are used to output the lines of the `LineBlock`
element:
- AsciiDoc: a `[verse]` block,
- ConTeXt: text surrounded by `\startlines` and `\endlines`,
- HTML: `div` with an per-element style setting to interpret the content as
pre-wrapped,
- Markdown: line blocks if the `line_blocks` extension is enabled, a simple
paragraph with hard linebreaks otherwise,
- Org: VERSE block,
- RST: a line block, and
- all other formats: a paragraph, containing hard linebreaks between lines.
Custom lua writers should be updated to use the `LineBlock` element.
|
|
Pandoc and Org-mode use different programming language identifiers. An
additional translation between those identifiers is added to avoid
unexpected behavior. This fixes a problem where language specific
source code would sometimes be output as example code.
|
|
Org-mode treats links as document internal searches unless the link
target looks like a URL or file path, either relative or absolute. This
change ensures that this is always the case.
|
|
An Org-mode figure should be surrounded by blank lines. The figure
would be recognized regardless, but images in the following line would
unintentionally be treated as figures as well.
|
|
Org-mode only treats an image as a figure if it is directly preceded by
a caption.
|
|
Div blocks handling is changed to make the output look more like
idiomatic org mode:
- Div-wrapped content is output as-is if the div's attribute is the
null attribute.
- Div containers with an id but neither classes nor key-value pairs
are unwrapped and the id is added as an anchor.
- Divs with classes associated with greater block elements are
wrapped in a `#+BEGIN`...`#+END` block.
- The old behavior for Divs with more complex attributes is kept.
|
|
Org mode allows arbitrary raw inlines ("export snippets" in Emacs
parlance) to be included as `@@format:raw foreign format text@@`.
Support for this features is added to the Org writer.
|
|
For the implementation of the Drawer element in the Org Writer, we make
use of a generic Block container with attributes. The presence of a
`drawer` class defines that the `Div` constructor is a drawer. The first
class defines the drawer name to use. The key-value list in the
attributes defines the keys to add inside the Drawer. Lastly, the list
of Block elements contains miscellaneous blocks elements to add inside
of the Drawer.
Signed-off-by: Albert Krewinkel <albert@zeitkraut.de>
|
|
The `ID` property is reserved for internal use by Org-mode and should
not be used. The `CUSTOM_ID` property is to be used instead, it is
converted to the `ID` property for certain export format.
The reader and writer erroneously used `ID`. This is corrected by using
`CUSTOM_ID` where appropriate.
|
|
This allows header attributes to be added to org documents in the form
of `:PROPERTIES:` drawers. All available attributes are stored as
key/value pairs. This reflects the way the org reader handles
`:PROPERTIES:` blocks.
This closes #1962.
|
|
Empty table rows should not be dropped from the output, so row-height is
always set to be at least 1.
|
|
|
|
Added threefold wrapping option.
* Command line option: deprecated `--no-wrap`, added
`--wrap=[auto|none|preserve]`
* Added WrapOption, exported from Text.Pandoc.Options
* Changed type of writerWrapText in WriterOptions from
Bool to WrapOption.
* Modified Text.Pandoc.Shared functions for SoftBreak.
* Supported SoftBreak in writers.
* Updated tests.
* Updated README.
Closes #1701.
|
|
mb21-new-image-attributes
* Bumped version to 1.16.
* Added Attr field to Link and Image.
* Added `common_link_attributes` extension.
* Updated readers for link attributes.
* Updated writers for link attributes.
* Updated tests
* Updated stack.yaml to build against unreleased versions of
pandoc-types and texmath.
* Fixed various compiler warnings.
Closes #261.
TODO:
* Relative (percentage) image widths in docx writer.
* ODT/OpenDocument writer (untested, same issue about percentage widths).
* Update pandoc-citeproc.
|
|
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
|
|
This is needed for ghci to work with pandoc, given that we
now use a custom prelude.
Closes #2503.
|
|
- The (non-exported) prelude is in prelude/Prelude.hs.
- It exports Monoid and Applicative, like base 4.8 prelude,
but works with older base versions.
- It exports (<>) for mappend.
- It hides 'catch' on older base versions.
This allows us to remove many imports of Data.Monoid
and Control.Applicative, and remove Text.Pandoc.Compat.Monoid.
It should allow us to use -Wall again for ghc 7.10.
|
|
|
|
(mb21)
|
|
|
|
The Org Writer now writes empty span elements which have an id as an anchor.
For example `Span ("uid", [], []) []` becomes `<<uid>>`
|
|
|
|
Hard linebreaks in Org mode are represented by the string "\\" as the
last characters in a line. Adds this feature to the Org-mode writer.
|
|
Replaces long conditional chains with calls to `elem` and `notElem`.
|
|
Textile, MediaWiki, Markdown, Org, RST will emit raw HTML div tags for divs.
Otherwise Div and Span are "transparent" block containers.
|
|
Currently these are "transparent" containers, except in HTML,
where they produce div and span elements with attributes.
|
|
* Text.Pandoc.Writers.Shared contains shared functions used
only in writers.
* metaToJSON now takes a WriterOptions parameter, and will
return an empty object if standalone is not specified.
|
|
Previously if you set a value both in metadata and with a variable,
they'd be combined into a list. Now the variable replaces the
value in document metadata. If many variables with the same
name are set, a list is created.
Shared: metaToJSON now has an argument for a variable list.
|
|
This way explicitly specified fields not overridden.
Fixes a problem e.g. with specifying a documentclass via
the command line using -V.
|
|
* 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.
|