Age | Commit message (Collapse) | Author | Files | Lines |
|
avoiding the need to depend on the executable-path package.
|
|
This avoids code duplication between Command and Old.
|
|
Apparently Cabal sets a `pandoc_datadir` environment variable
so that the data files will be sought in the source directory
rather than in the final destination (where they aren't yet
installed).
So we no longer need to set `--data-dir` in the tests. We just
need to make sure `pandoc_datadir` is set in the environment
when we call the program in the test suite.
This will fix the issue with loading of pandoc.lua when
pandoc is built with `-embed_data_files`, reported in #7163.
Closes #7163.
|
|
[API change] This affects `readFile`, `getContents`, `writeFileWith`,
`writeFile`, `putStrWith`, `putStr`, `putStrLnWith`, `putStrLn`.
`hPutStrWith`, `hPutStr`, `hPutStrLnWith`, `hPutStrLn`, `hGetContents`.
This avoids the need to uselessly create a linked list of characters
when emiting output.
|
|
|
|
|
|
Mmny of our tests require running the pandoc
executable. This is problematic for a few different reasons.
First, cabal-install will sometimes run the test suite
after building the library but before building the executable,
which means the executable isn't in place for the tests.
One can work around that by first building, then building
and running the tests, but that's fragile. Second,
we have to find the executable. So far, we've done that
using a function findPandoc that attempts to locate it
relative to the test executable (which can be located
using findExecutablePath). But the logic here is delicate
and work with every combination of options.
To solve both problems, we add an `--emulate` option to
the `test-pandoc` executable. When `--emulate` occurs
as the first argument passed to `test-pandoc`, the
program simply emulates the regular pandoc executable,
using the rest of the arguments (after `--emulate`).
Thus,
test-pandoc --emulate -f markdown -t latex
is just like
pandoc -f markdown -t latex
Since all the work is done by library functions,
implementing this emulation just takes a couple lines
of code and should be entirely reliable.
With this change, we can test the pandoc executable
by running the test program itself (locatable using
findExecutablePath) with the `--emulate` option.
This removes the need for the fragile `findPandoc`
step, and it means we can run our integration tests
even when we're just building the library, not the
executable.
Part of this change involved simplifying some complex
handling to set environment variables for dynamic
library paths. I have tested a build with
`--enable-dynamic-executable`, and it works, but
further testing may be needed.
|
|
|
|
Note that the multirow package is needed for rowspans.
It is included in the latex template under a variable,
so that it won't be used unless needed for a table.
|
|
|
|
Previously we used Setext (underlined) headings by default.
The default is now ATX (`##` style).
* Add the `--markdown-headings=atx|setext` option.
* Deprecate `--atx-headers`.
* Add constructor 'ATXHeadingInLHS` constructor to `LogMessage` [API change].
* Support `markdown-headings` in defaults files.
* Document new options in MANUAL.
Closes #6662.
|
|
Closes: #6314
|
|
* Fix hlint suggestions, update hlint.yaml
Most suggestions were redundant brackets. Some required
LambdaCase.
The .hlint.yaml file had a small typo, and didn't ignore camelCase
suggestions in certain modules.
|
|
Part of: #6314
|
|
* HTML writer: add support for row headers, colspans, rowspans
* Add planet table tests
See #6312
|
|
|
|
* Update copyright year
* Copyright: add notes for Lua and Jira modules
|
|
New formats:
- `jats_archiving` for the "Archiving and Interchange Tag Set",
- `jats_publishing` for the "Journal Publishing Tag Set", and
- `jats_articleauthoring` for the "Article Authoring Tag Set."
The "jats" output format is now an alias for "jats_archiving".
Closes: #6014
|
|
Closes #5556
|
|
* Set dbBook to true when traversing a chapter too.
Currently, a `<title/>` in a chapter and in a `<section/>` below that
chapter have the same level if they're not inside a `<book/>`.
This can happen in a multi-file book project. Also see the example at
https://tdg.docbook.org/tdg/4.5/chapter.html
Co-authored-by: Félix Baylac-Jacqué <felix@alternativebit.fr>
* Add docbook-chapter test
This tests nested `<section/>` and makes sure `<title/>` in the first
`<section/>` below `<chapter/>` is one level deeper than the `<chapter/>`'s
`<title/>`, also when not inside a `<book/>`.
Co-authored-by: Félix Baylac-Jacqué <felix@alternativebit.fr>
|
|
This adds support for Atlassian's jira markup.
Closes #2497
|
|
|
|
Remove old pandoc_datadir environment variable, which
doesn't do anything.
|
|
|
|
Closes #5274.
|
|
|
|
Quite a few modules were missing copyright notices.
This commit adds copyright notices everywhere via haddock module
headers. The old license boilerplate comment is redundant with this and has
been removed.
Update copyright years to 2019.
Closes #4592.
|
|
|
|
|
|
|
|
|
|
Removed `--latexmathml`, `--gladtex`, `--mimetex`, `--jsmath`, `-m`,
`--asciimathml` options.
Removed `JsMath`, `LaTeXMathML`, and `GladTeX` constructors from
`Text.Pandoc.Options.HTMLMathMethod` [API change].
Removed unneeded data file LaTeXMathML.js and updated tests.
Bumped version to 2.2.
|
|
|
|
This seems to be necessary if we are to use our custom Prelude
with ghci.
Closes #4464.
|
|
|
|
|
|
|
|
* Basic skeleton for creole reader.
No real functionality besides preliminary bold and italics yet.
* Creole: add support for bold/italic with implicit end at paragraph end.
* Creole: add support for headings.
* Creole: add support for tilde escaped chars.
* Basic skeleton for creole reader.
No real functionality besides preliminary bold and italics yet.
* Creole: add support for bold/italic with implicit end at paragraph end.
* Creole: add support for headings.
* Creole: add support for tilde escaped chars.
* Add a test suite for the creole parser
So far this covers only things the parser already supports.
* Added simple parsing of flat unordered lists.
* Added tests for unordered lists in creole.
* First, wrong(!) implementation of sublists.
Fails test, as sublists should not be embedded in a list item!
* Implementation of unordered sublists.
* Added support for ordered lists to creole reader.
* Added utility function to append parsers to Creole reader.
* Creole reader: Fixed list item end detection in sub lists.
* Tests for creole reader: added more tests for lists.
Covering ordered and unordered tests, even mixed. Tests for
formatting in list items still missing...
* Added "nowiki" blocks. One exception rule is missing...
* Creole reader: nowiki: implemented exception for curly brackets.
* Creole reader: added inline nowiki.
* Creole reader: added horizontalRule.
* Creole reader: added auto linking of URIs.
* Creole reader: detect horizontalRule as para end.
Used the opportunity for a little refactoring.
* Creole reader: added forced line breaks.
Including test.
* Creole reader: implement wiki links.
* Creole reader: added image support.
* Creole reader: support images as links.
* Creole reader: implemented placeholder -- by simply dropping them.
* Creole reader: added tests for links.
After observing a regression, it was really time... ;-)
* Creole reader: fixed links with names.
* Creole reader: allow space after first of enclosing tags.
Space after the start of formatting tags are allowed with creole,
e.g. "there is // italic text // in here" is legal.
This problem was discovered using the creole1.0test.txt document from
http://www.wikicreole.org/wiki/Creole1.0TestCases
See l.57:
# // italic item 3 //
* Creole reader: fixed links without names.
* Creole reader: Tests, sorted into groups.
* Creole reader: implemented tables.
* Removed redundant import.
* Creole reader: add correct escaping of links.
* Creole reader: allow handling of e.g. links in parenthesis and quotes.
* Creole reader: Modified disclaimer as most of the code is actually by me.
* Creole reader: Tests: added escaped links.
* Creole reader: preserve leading and trailing space in bold/italic.
* Creole reader: detect tables without a leading blank line.
* Creole Reader: added official creole1.0test.txt as "old" test.
The base document was downloaded from
http://www.wikicreole.org/wiki/Creole1.0TestCases.
The Wiki, and therefore the test document is
Copyright (C) by the contributors.
Some rights reserved, license CC BY-SA.
http://creativecommons.org/licenses/by-sa/1.0/
|
|
In old tests & command tests, we now set the environment variable
pandoc_datadir.
In lua tests, we set the datadir explicitly.
|
|
Added TikiWiki reader, including tests and documentation.
It's probably not *complete*, but it works pretty well, handles all
the basics (and some not-so-basics).
|
|
* New module Text.Pandoc.Readers.Vimwiki, exporting readVimwiki [API change].
* New input format `vimwiki`.
* New data file, `data/vimwiki.css`, for displaying the HTML produced by this reader and pandoc's HTML writer in the style of vimwiki's own HTML export.
|
|
* New module Text.Pandoc.Writer.JATS exporting writeJATS.
* New output format `jats`.
* Added tests.
* Revised manual.
|
|
* New module: Text.Pandoc.Writers.Ms.
* New template: default.ms.
* The writer uses texmath's new eqn writer to convert math
to eqn format, so a ms file produced with this writer
should be processed with `groff -ms -e` if it contains
math.
|
|
|
|
|
|
* Add Muse writer
* Advertise new Muse writer
* Muse writer: add regressions tests
|
|
|
|
These were confusing.
Now we rely on the +raw_tex or +raw_html extension with latex
or html input.
Thus, instead of
--parse-raw -f latex
we use
-f latex+raw_tex
and instead of
--parse-raw -f html
we use
-f html+raw_html
|
|
|
|
|