Commit graph

8633 commits

Author SHA1 Message Date
John MacFarlane
2d94d48332 Added two lua test files to extra-source-files in pandoc.cabal.
This was caught by our new .travis.yml, which builds from
an extracted sdist tarball instead of the repository.
2017-03-20 17:32:35 +01:00
John MacFarlane
a85d7849fc More travis fixes. 2017-03-20 17:22:48 +01:00
John MacFarlane
9836111cd2 Travis: install hsb2hs. 2017-03-20 16:19:19 +01:00
John MacFarlane
7f89792d9a More travis fixes. 2017-03-20 16:07:17 +01:00
John MacFarlane
ba3f3653e9 Added hslua-aeson to stack.yamls. 2017-03-20 16:03:24 +01:00
John MacFarlane
757edd0525 More travis fixes. 2017-03-20 15:55:42 +01:00
John MacFarlane
5a1c9109e0 Fixed .travis.yml. 2017-03-20 15:43:15 +01:00
John MacFarlane
51ed4a98a9 .travis.yml: create a source dist and do cabal build and test there.
That way we catch errors due to files missing from the data
section of pandoc.cabal.
2017-03-20 15:24:16 +01:00
Albert Krewinkel
f2f6851713 Lua filters (#3514)
* Add `--lua-filter` option.  This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed.  Note that lua filters are all applied after regular filters, regardless of their position on the command line.
* Add Text.Pandoc.Lua, exporting `runLuaFilter`.  Add `pandoc.lua` to data files.
* Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module.
* Add Tests.Lua to tests.
* Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters.
* Document in MANUAL.txt.
2017-03-20 15:17:03 +01:00
Mauro Bieg
b010a8c5e7 docx writer: lang meta, see #1667 (#3515) 2017-03-20 10:06:24 +01:00
John MacFarlane
34412cf57c RST reader: recurse into bodies of unknown directives.
In most cases it's better to preserve the content than
to emit it.  This isn't guaranteed to have good results;
it will fail spectacularly for unknown raw or verbatim
directives.

See #3432.
2017-03-19 21:55:38 +01:00
John MacFarlane
fff3489bf3 Removed failing part of 3348 test.
This was failing because of a small discrepancy in markdown
table header line lengths on appveyor.

It's a minor issue, I can't see what is causing it, and
it's irrelevant to the issue this is testing, so we'll
just write native for this test.
2017-03-19 20:37:39 +01:00
John MacFarlane
43a429b182 linux/make_tarball.sh: remove old target directory before creating. 2017-03-19 20:09:38 +01:00
John MacFarlane
badbe09187 Added control.in to repository. 2017-03-19 18:08:52 +01:00
John MacFarlane
de8d4e2f86 Fixed paths: deb->linux. 2017-03-19 17:35:19 +01:00
John MacFarlane
4a1c3faec8 linux tarball: man pages in share/man rather than man/. 2017-03-19 16:32:15 +01:00
John MacFarlane
74fd00b5f6 Improved linux tar.gz creation and added Dockerfile to repository. 2017-03-19 16:24:52 +01:00
John MacFarlane
6756e23f94 Rename static-linux -> linux. 2017-03-19 15:35:52 +01:00
John MacFarlane
e98b9f6796 Removed unneeded deb directory.
We now use static-linux to create the deb.
2017-03-19 15:35:22 +01:00
John MacFarlane
a96105551b static-linux: Dockerfile now creates the .deb too. 2017-03-19 15:28:04 +01:00
John MacFarlane
671bf7a23f stack.pkg.yaml - use latest pandoc-citeproc. 2017-03-19 13:30:50 +01:00
John MacFarlane
5587ca2bf7 Update stack.pkg.yaml for latest pandoc-citeproc. 2017-03-19 11:50:51 +01:00
John MacFarlane
e185901660 Use latest pandoc-citeproc HEAD. 2017-03-19 11:27:15 +01:00
John MacFarlane
5922237b58 static-linux: allow setting TREE to build from arbitrary git commit. 2017-03-19 10:24:25 +01:00
John MacFarlane
18ff3db1f0 deb/Makefile: remove git submodule update. 2017-03-19 10:23:29 +01:00
John MacFarlane
86f400d57f Improved static linux build.
Also build pandoc-citeproc.
Put pandoc and pandoc-citeproc executables into a version-labeled tgz.
2017-03-19 09:16:22 +01:00
John MacFarlane
87f99f3fdf HTML reader: Better sanity checks on raw HTML.
This also affects the Markdown reader.

Closes #3257.
2017-03-18 22:43:57 +01:00
John MacFarlane
435221a9f3 Added test case to 3348 to try to figure out why appveyor build fails. 2017-03-17 17:10:43 +01:00
John MacFarlane
47b30bd91e stack.pkg.yaml - use latest pandoc-citeproc HEAD.
This should address appveyor test failures.
2017-03-17 16:48:55 +01:00
John MacFarlane
8f90b83fee Adjust command test 3348.md to specify column width.
This is meant to address a test failure on appveyor.
2017-03-17 16:19:51 +01:00
John MacFarlane
037af1b95b Improved static linux alpine build.
* Use -split-objs (reduces executable size from ~50M to 32M), at
  cost of much slower compilation.
* Moved building of prereqs from CMD to RUN, so they can be cached.
  Doing 'make build' will fetch the latest from git and rebuild
  pandoc, but dependencies needn't be rebuilt.
2017-03-17 16:02:49 +01:00
John MacFarlane
63c96f8b91 Added static-linux directory.
This provides a Makefile and Dockerfile sufficient for
producing a completely statically linked linux executable
for maximum portability.

If docker is installed, this should suffice:

make setup
make build

The binary will be placed in artifacts/.
2017-03-17 14:19:08 +01:00
John MacFarlane
090165d714 Added test for #256. 2017-03-16 22:31:36 +01:00
John MacFarlane
f5f6ff2c75 MANUAL: document --abbreviations.
Closes #256.
2017-03-16 22:23:35 +01:00
John MacFarlane
c93d069d49 Add default abbreviations file (data/abbreviations).
This contains a list of strings that will be recognized by pandoc's
Markdown parser as abbreviations.  (A nonbreaking space will
be inserted after the period, preventing a sentence space in
formats like LaTeX.)

Users can override the default by putting a file abbreviations
in their user data directory (`~/.pandoc` on *nix).
2017-03-16 22:16:41 +01:00
John MacFarlane
2fe806e9ac Added --abbreviations=FILE option for custom abbreviations file. 2017-03-16 21:45:50 +01:00
John MacFarlane
38c3a68346 LaTeX/Beamer writer: allow hyperlinks to frames.
Previously you could link to a header above or below slide
level but not TO slide level.  This commit changes that.
Hypertargets are inserted inside frame titles; technically
the reference is to just after the title, but in normal
use (where slides are viewed full screen in a slide show),
this does not matter.

Closes #3220.
2017-03-16 10:15:14 +01:00
John MacFarlane
257d96f199 Makefile: allow make test to take TESTARGS. 2017-03-15 17:22:07 +01:00
John MacFarlane
482e5b78a0 OpenDocument writer: use more widely available bullet characters.
The old characters weren't available in some font sets.
These seem to work well on Windows and Linux versions of LibreOffice.

Closes #1400.
2017-03-15 17:19:28 +01:00
John MacFarlane
cc57e36180 Removed another unused cabal dependency. 2017-03-15 15:20:37 +01:00
John MacFarlane
befaf037ce Removed some unnecessary build-depends. 2017-03-15 15:12:14 +01:00
John MacFarlane
2827570c6a Fixed weigh-pandoc so it compiles again. 2017-03-15 15:00:17 +01:00
John MacFarlane
2235c2a8f7 Use tasty-golden for golden tests in Old. 2017-03-15 00:27:39 +01:00
John MacFarlane
93c49a2865 Command tests: just findPandoc once. 2017-03-14 23:39:28 +01:00
John MacFarlane
14edbd2967 Removed unneeded import. 2017-03-14 21:30:15 +01:00
John MacFarlane
6cb54c3def Got rid of distracting warning in test output. 2017-03-14 21:06:14 +01:00
John MacFarlane
ebbaf2e965 Small test plumbing improvement. 2017-03-14 17:27:30 +01:00
John MacFarlane
6ecc5b96a9 Use tasty for tests rather than test-framework. 2017-03-14 17:07:23 +01:00
John MacFarlane
0b4ae3af66 Removed unused symbol. 2017-03-13 22:21:50 +01:00
John MacFarlane
6bf3f89d69 Better handling of \part in LaTeX.
Closes #1905.

Removed stateChapters from ParserState.

Now we parse chapters as level 0 headers, and parts as level -1 headers.
After parsing, we check for the lowest header level, and if it's
less than 1 we bump everything up so that 1 is the lowest header level.
So `\part` will always produce a header; no command-line options
are needed.
2017-03-13 22:11:10 +01:00