Commit Graph
15846 Commits
Author SHA1 Message Date
John MacFarlane 301f905839 Makefile: add transitive-deps target. 2022-09-27 12:52:27 -07:00
John MacFarlane 78c0016526 Makefile: Add coverage target 2022-09-27 12:39:43 -07:00
John MacFarlane 04d79eac30 CI: Update files that don't trigger CI. 2022-09-27 10:47:40 -07:00
John MacFarlane 84c053222c Update Makefile. 2022-09-27 10:23:50 -07:00
John MacFarlane 3162f111ef CI: remove macos tests.
These take much longer than the others and slow down CI,
but there are almost never issues on macos that wouldn't show on linux.
2022-09-27 10:05:25 -07:00
John MacFarlane e6db278061 Split benchmarks out of CI into separate action.
The benchmark action is only run on manual dispatch.

Rationale: this action dramatically slows down CI.
It is nice to run benchmarks, but we don't need them all the time.

We add (non-optimized) testing of benchmark compilation to one of
the CI builds.
2022-09-27 09:34:57 -07:00
John MacFarlane e92f1a5ecf Allow url field in bibtext (input and output).
This field is not officially supported, but many styles
can handle it (<https://www.bibtex.com/f/url-field/>),
and others will ignore it.

Closes #8287.
2022-09-27 09:04:36 -07:00
John MacFarlane 5849317bd3 Add link to pandoc-lua manual. 2022-09-27 08:48:34 -07:00
John MacFarlane d2b300e96d pandoc-server: minor code simplification. 2022-09-27 08:46:29 -07:00
John MacFarlane c5961db10d MANUAL.txt: clarify what background-image does in reveal.js.
Closes #6450.
2022-09-27 08:42:46 -07:00
Albert Krewinkel efecff1f2f pandoc-cli: support -E flag in pandoc-lua 2022-09-27 08:42:27 -07:00
Albert Krewinkel 175b791529 pandoc-cli: support "lua" and "serve" as commands
Pandoc behaves like `pandoc-lua` and `pandoc-server` if the first
argument is `lua` and `serve`, respectively.
2022-09-27 08:42:27 -07:00
Albert Krewinkel a3fd6c674d pandoc-cli: update to hslua-cli-1.2 2022-09-27 08:42:27 -07:00
Albert Krewinkel 2bad9a9aa4 pandoc-cli: Avoid the CPP language extension
Alternative behavior for the *server* flag is implemented by using
separate modules.
2022-09-27 08:42:27 -07:00
John MacFarlane 5e6b28cd0e CI: Test compilation without 'server' flag. 2022-09-26 22:03:27 -07:00
John MacFarlane efea562234 LaTeX writer: ignore languages with no babel equivalent...
instead of generating an invalid command in the preamble.
Closes #8325.
2022-09-26 21:37:38 -07:00
Albert Krewinkel de0e3ff5f6 pandoc-lua: support more command line flags 2022-09-26 19:50:39 +02:00
Pranesh Prakash 62f0e9ffd9 Made example for blank_before_blockquote clearer (#8324)
Changed the "nested" to "not nested" to make it clear it wouldn't get nested.
2022-09-26 10:47:25 -07:00
John MacFarlane 13ee8b82da Add server flag to pandoc-cli.
This allows the executable to be built without support for
"server mode."
2022-09-26 09:25:54 -07:00
John MacFarlane 06a2bd3e98 Fix 'quick-cabal' target in Makefile to build pandoc-cli. 2022-09-26 08:36:17 -07:00
John MacFarlane d0c6b3110f CI: use secrets.CACHE_VERSION as cache key.
This allows us to invalidate the cache by incrementing
secrets.CACHE_VERSION in the UI.

The key component deriving from cabal.project has been removed.

Local caching has been re-added for Windows/stack.
2022-09-26 08:34:27 -07:00
John MacFarlane 3aa24ec161 T.P.Citeproc.Locator: update sub verbo to sub-verbo.
This is a change in the term's canonical name in citeproc.
As a result of this change, `sub verbo` locators have not worked
in pandoc since citeproc 0.7.

This patch fixes `sub verbo`.

Closes #8315.
2022-09-25 19:13:43 -07:00
Artem Pelenitsyn b3e8a28414 doc: use cabal's --package-env more (#8317) 2022-09-25 17:13:36 -07:00
Albert Krewinkel 58f4b78ed9 cabal file: Remove unused package
This was left over from the first Lua CLI implementation.
2022-09-24 08:39:11 +02:00
Albert Krewinkel e3648357cf Use hslua-cli package for pandoc-lua interface 2022-09-23 22:26:37 +02:00
Albert Krewinkel ced8b258be Fix stack config, nightly build 2022-09-23 11:16:06 +02:00
Albert Krewinkel 9f2e49ef03 Fix support for Lua 5.3 2022-09-23 10:19:49 +02:00
Albert Krewinkel 44600f4c0d Fix typo in manual 2022-09-23 09:59:44 +02:00
John MacFarlane bb8a046464 Org writer: pass through unknown languages in code blocks.
Previously we whitelisted the language for begin_src, and produced
begin_example if the language was not found on the whitelist.

Closes #8278.
2022-09-22 19:56:22 -07:00
John MacFarlane 8ad64a8318 Add pandoc-lua and man pages to releases. 2022-09-22 14:49:02 -07:00
Albert Krewinkel 22fa51ded1 Make pandoc behave like a Lua interpreter when called as pandoc-lua. (#8311) 2022-09-22 14:39:25 -07:00
John MacFarlane bd1d923b86 Split pandoc-server, pandoc-cli into separate packages. (#8309)
This also removes the unnecessary Setup.hs from pandoc.
Cabal does not need this with build-type 'simple'.
2022-09-22 09:47:07 -07:00
Albert Krewinkel b38292c234 LaTeX writer: do not repeat caption on headless tables
The caption of headless tables was repeated on each page that contained
part of the table. It is now made part of the "first head", i.e. the
table head that is printed only once.
2022-09-21 12:03:41 +02:00
Albert Krewinkel 47d09df6a5 LaTeX writer: clarify why \endfirsthead is used for tables 2022-09-21 10:51:04 +02:00
John MacFarlane 47a7cdecb9 Export applyFilter from T.P.Lua.Filter.
Motivation: now we need not have any logic referring to hslua
types (LuaE) in T.P.Filter.Lua.  This restricts the parts of Pandoc
that deal directly with hslua to T.P.Lua (and in tests,
Tests.Lua).

[API changes]

T.P.Lua now exports `applyFilter`, `readCustom`, and `writeCustom`.
The lower-level function `runFilterFile` is no longer exported.
2022-09-20 14:11:22 -07:00
John MacFarlane 7c07e57b60 Add T.P.Lua.Reader, T.P.Lua.Writer.
(Unexported modules, presently.)

These contain the definitions of `readCustom` and `writeCustom`
that were previously in T.P.Readers.Custom and T.P.Writers.Custom.

Motivation is to ensure that all of the Lua-related code is under
the T.P.Lua tree.  This will make it easier to make pandoc-lua
a separate package or put lua support under a flag, if we decide to
do that.
2022-09-20 14:11:13 -07:00
John MacFarlane 5e377cc9c0 README.template: fix link to stackage. 2022-09-20 12:05:18 -07:00
John MacFarlane d7a52e2478 Text.Pandoc.App: export IpynbOutput(..).
[API change]
2022-09-20 10:38:53 -07:00
John MacFarlane 3af93d041a Ms writer: properly format display equations.
Previously they were being translated to eqn as inline equations.
Closes #8308.
2022-09-20 10:22:21 -07:00
John MacFarlane f3e9669e84 Commonmark writer: ensure that we don't have blank lines in raw HTML.
Closes #8307.
2022-09-19 12:03:03 -07:00
John MacFarlane cfbf0f096b Org reader: Allow org-ref v2 citations with & prefix.
Closes #8302.
2022-09-19 10:30:44 -07:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 7f1bb99a03 build(deps): bump actions/upload-artifact from 2 to 3 (#8304)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-18 20:38:35 -07:00
John MacFarlane c0ff59c272 BibTeX parser: fix handling of % in url field.
`%` does not function as a comment character inside `url`
(where URL-encoding is common).

Commit 6fb2973a58 mistakenly
took this reassignment of `%` to be a general feature of
braced (but not quoted) BibTeX fields.

This commit restores the correct behavior of `%` in braced fields
other than `url`, and corrects the behavior of `%` in `url`
when the value is quoted.

Closes #7678 (again).
2022-09-18 19:17:48 -07:00
John MacFarlane 311a340687 Add prefixes to identifiers with --file-scope. (#8282)
This change only affects the case where `--file-scope` is used
and more than one file is specified on the command line.

In this case, identifiers will be prefixed with a string
derived from the file path, to disambiguate them. For example,
an identifier `foo` in `contents/file1.txt` will become
`contents__file1.txt__foo`.  Links will be adjusted accordingly:
if `file2.txt` links to `file1.txt#foo`, then the link will
be changed to point to `#file1.txt__foo`.  Similarly, a link
to `file1.txt` will point to `#file1.txt`.  A Div with an
identifier derived from the file path will be added around
each file's content, so that links to files will still work.

Closes #6384.

[API change]: Text.Pandoc.Shared exports `textToIdentifier`.
2022-09-18 18:11:40 -07:00
John MacFarlane d79f8386d4 Fix implicit_header_references with duplicate headings.
Documentation says that when more than one heading has the same text,
an implicit reference `[Heading text][]` refers to the first one.
Previously pandoc linked to the last one instead. This patch
makes pandoc conform to the documented behavior.

See #8300.
2022-09-14 22:23:45 +02:00
John MacFarlane eb03cad6ae XWiki writer: use template if it is specified.
Previously templates were ignored completely.

Closes #8296.
2022-09-13 11:14:04 +02:00
Albert Krewinkel 369058d53d T.P.MIME: Removes more unnecessary overrides.
| Ext.  | Old type                 | New type                        |
|-------|--------------------------|---------------------------------|
| fm    | application/x-maker      | application/vnd.framemaker      |
| frame | application/x-maker      | application/vnd.framemaker      |
| gsf   | application/x-font       | application/x-font-ghostscript  |
| java  | text/x-java              | text/x-java-source              |
| kpr   | application/x-kpresenter | application/vnd.kde.kpresenter  |
| kpt   | application/x-kpresenter | application/vnd.kde.kpresenter  |
| ksp   | application/x-kspread    | application/vnd.kde.kspread     |
| kwd   | application/x-kword      | application/vnd.kde.kword       |
| kwt   | application/x-kword      | application/vnd.kde.kword       |
| lha   | application/x-lha        | application/x-lzh-compressed    |
| lhz   | application/x-lhz        | application/x-lzh-compressed    |
| maker | application/x-maker      | application/vnd.framemaker      |
| mif   | application/x-mif        | application/vnd.mif             |
| pl    | text/x-perl              | application/x-perl              |
| pm    | text/x-perl              | application/x-perl              |
| sisx  | x-epoc/x-sisx-app        | application/vnd.symbian.install |
| sitx  | application/x-stuffit    | application/x-stuffitx          |
| skd   | application/x-koan       | application/vnd.koan            |
| skm   | application/x-koan       | application/vnd.koan            |
| skp   | application/x-koan       | application/vnd.koan            |
| skt   | application/x-koan       | application/vnd.koan            |
| tgz   | application/x-gtar       | application/x-tgz               |
| tk    | text/x-tcl               | application/x-tcl               |
| wpd   | application/wordperfect  | application/vnd.wordperfect     |
2022-09-12 11:39:45 +02:00
John MacFarlane c7915208ab Depend on dev texmath. 2022-09-12 10:20:22 +02:00
Albert Krewinkel d327f2a85b T.P.MIME: Remove deprecated overrides (#8292)
This changes the media type that's used for the file extension listed
below. The new types are either IANA approved, or so similar to the
override that is does not seem sensible to keep a separate entry.
2022-09-11 20:46:05 +02:00
Albert Krewinkel c9f4255c80 Fix stack.yaml 2022-09-11 19:09:14 +02:00