Commit graph

14393 commits

Author SHA1 Message Date
John MacFarlane
139376bbfb trypandoc: remove unneeded imports. 2021-03-02 10:03:52 -08:00
John MacFarlane
595d2e25ea cabal.project: don't explicitly set -trypandoc.
If we do, this can't be overridden on the command line.
2021-03-02 10:03:52 -08:00
John MacFarlane
651b241533 Avoid split-sections for Windows rc.
We get an error "too many sections."

Maybe a bug in stack?
https://stackoverflow.com/questions/64287505/ld-too-many-sections-90295
2021-03-02 10:01:52 -08:00
John MacFarlane
26c496d936 Use -split-sections in creating release binary.
This is supposed to reduce executable size.
2021-03-01 10:06:10 -08:00
John MacFarlane
7f1b933aaa Make T.P.Readers.LaTeX.Types an unexported module.
[API change]

This is really an implementation detail that shouldn't be
exposed in the public API.
2021-03-01 09:46:43 -08:00
John MacFarlane
382f0e23d2 Factor out T.P.Readers.LaTeX.Macro. 2021-03-01 09:46:43 -08:00
Albert Krewinkel
e1454fe0d0
Jira writer: use Span identifiers as anchors
Closes: tarleb/jira-wiki-markup#3.
2021-03-01 14:36:11 +01:00
John MacFarlane
3793ed8beb Removed unnecessary pragmas. 2021-02-28 23:43:55 -08:00
John MacFarlane
6a6291d9e3 Change T.P.Readers.LaTeX.SIunitx to export a command map...
instead of individual commands.
2021-02-28 23:05:35 -08:00
John MacFarlane
12b47656d4 Remove superfluous imports. 2021-02-28 22:57:36 -08:00
John MacFarlane
7e38b8e55a T.P.Readers.LaTeX: Don't export tokenize, untokenize.
[API change]

These were only exported for testing, which seems the
wrong thing to do.  They don't belong in the public
API and are not really usable as they are, without access
to the Tok type which is not exported.

Removed the tokenize/untokenize roundtrip test.

We put a quickcheck property in the comments which
may be used when this code is touched (if it is).
2021-02-28 22:53:42 -08:00
John MacFarlane
2463fbf61d LaTeX writer: use function instead of map for accent lookup. 2021-02-28 21:43:11 -08:00
John MacFarlane
d2bb0c7c8d Factor out T.P.Readers.LaTeX.Math. 2021-02-28 21:05:25 -08:00
John MacFarlane
5537802dc9 Fix CI for older cabal versions.
We add fields to matrix.versions to handle the cabal
command prefix (v2-, new-, nothing) and whether `--test-option`
is supported.
2021-02-28 18:33:04 -08:00
John MacFarlane
dd56822006 CI: don't use --test-option with older cabal versions (< 3). 2021-02-28 16:01:38 -08:00
John MacFarlane
36456070c4 Fix bug in last commit. 2021-02-28 15:36:46 -08:00
John MacFarlane
7229d068c9 Markdown reader efficiency improvements.
Benchmarks show that these make the reader 13-17% faster,
depending on extensions.
2021-02-28 15:18:31 -08:00
John MacFarlane
cc543cf5b6 LaTeX reader: another small efficiency improvement. 2021-02-28 14:34:04 -08:00
John MacFarlane
f6cf03857b LaTeX reader efficiency improvements.
In conjunction with other changes this makes the reader
almost twice as fast on our benchmark as it was on Feb. 10.
2021-02-28 12:52:41 -08:00
John MacFarlane
564c39beef Move setDefaultLanguage to T.P.Readers.LaTeX.Lang. 2021-02-28 09:49:34 -08:00
John MacFarlane
5e571d9635 LaTeX reader: remove two unnecessary parsers in inline.
These are handled anyway by regularSymbol.
2021-02-28 09:39:01 -08:00
John MacFarlane
7e83686d31 trypandoc: add 2 second timeout. 2021-02-28 09:24:37 -08:00
John MacFarlane
2faa57e8e9 Factor out T.P.Readers.LaTeX.Citation. 2021-02-28 09:12:09 -08:00
John MacFarlane
08231f5cdd Factor out T.P.Readers.LaTeX.Table. 2021-02-27 21:40:56 -08:00
John MacFarlane
925815bb33 Split off T.P.Readers.LaTeX.Accent.
To help reduce memory demands compiling the main LaTeX reader.
2021-02-27 17:02:44 -08:00
John MacFarlane
63123db22f Add xml-conduit to stack.yaml extra-deps. 2021-02-27 14:26:10 -08:00
John MacFarlane
cbc3f034ad Use skylighting 0.10.4.
This version of skylighting uses xml-conduit rather than hxt.
This speeds up parsing of XML syntax definitions fourfold, and
removes four packages from pandoc's dependency graph:

hxt-charproperties
hxt-unicode
hxt-regex-xmlschema
hxt
2021-02-27 14:26:10 -08:00
Albert Krewinkel
3327b225a1
Lua: use strict evaluation when retrieving AST value from the stack
Fixes: #6674
2021-02-27 21:57:12 +01:00
John MacFarlane
e798db14e8 Add tools/parseTimings.pl.
A script to help pin down which modules take the most time
and memory to compile.
2021-02-26 23:52:28 -08:00
John MacFarlane
c072b7cb59 CI: hide successes in linux test output. 2021-02-26 18:02:22 -08:00
John MacFarlane
a9cc5d2616 Update tests for changes to https URLs. 2021-02-26 18:00:45 -08:00
Salim B
fae6a204f1
Fix/update URLs and use HTTP**S** where possible (#7122) 2021-02-26 17:56:04 -08:00
Loïc Grobol
8123571e8e
Wrap url colours in braces in the default LaTeX template (#7121) 2021-02-26 10:05:30 -08:00
John MacFarlane
938f402dec CI: Add 'benchmark' to benchmark cache key.
For benchmark we build with optimizations, so the regular
cache is useless.
2021-02-22 23:24:13 -08:00
John MacFarlane
9767386676 Use latest skylighting. 2021-02-22 22:25:10 -08:00
John MacFarlane
d7cfa0ef4c Remove weigh-pandoc.
It's not really useful any more, now that our regular
benchmarks include data on allocation.
2021-02-22 22:10:20 -08:00
John MacFarlane
21d0b4745b benchmark CI improvements.
- don't build tests, just benchmarks.
- get allocation info.
2021-02-22 22:09:32 -08:00
John MacFarlane
15bf01cd63 Rename benchmark in CI. 2021-02-22 21:38:58 -08:00
John MacFarlane
56a6478a40 Add linux benchmark to CI. 2021-02-22 21:36:31 -08:00
John MacFarlane
f0a991a22b T.P.CSV: fix parsing of unquoted values.
Previously we didn't allow unescaped quotes in unquoted values,
but they are allowed. Closes #7112.
2021-02-22 21:18:04 -08:00
Albert Krewinkel
00e4bb51e4
tests: print accurate location if a test fails
Ensures that tasty-hunit reports the location of the failing test
instead of the location of the helper `test` function.
2021-02-22 23:56:04 +01:00
John MacFarlane
d30791a381 Fall back to latin1 if UTF-8 decoding fails...
...when handling URL argument served with no charset in the mime type.
The assumption is that most pages that don't specify a charset
in the mime type are either UTF-8 or latin1.  I think that's a good
assumption, though I'm not sure.
2021-02-22 14:17:22 -08:00
John MacFarlane
5a73c5d3f8 When downloading content from URL arguments, be sensitive to...
the character encoding.  We can properly handle UTF-8 and
latin1 (ISO-8859-1); for others we raise an error.
See #5600.
2021-02-22 14:01:10 -08:00
John MacFarlane
bafccd5aa2 T.P.Error: Add PandocUnsupportedCharsetError constructor...
...for PandocError.  [API change]
2021-02-22 14:01:04 -08:00
John MacFarlane
4617f229ea Text.Pandoc.MIME: add exported function getCharset.
[API change]
2021-02-22 13:28:47 -08:00
John MacFarlane
80fde18fb1 Text.Pandoc.UTF8: change IO functions to return Text, not String.
[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.
2021-02-22 11:30:07 -08:00
John MacFarlane
607c014e9d Update changelog. 2021-02-21 22:05:50 -08:00
John MacFarlane
aae1e617a6 Fix changelog-helper.sh 2021-02-21 19:02:28 -08:00
John MacFarlane
2b37ed9f21 LaTeX reader: further optimizations in satisfyTok.
Benchmarks show 2/3 of the run time and 2/3 of the allocation
of the Feb. 10 benchmarks.
2021-02-21 11:30:17 -08:00
John MacFarlane
db4f882315 LaTeX reader: removed sExpanded in state.
This isn't actually needed and checking it doesn't change
anything.

Also remove an unnecessary `doMacros` before `satisfyTok`,
which does it anyway.
2021-02-21 11:24:04 -08:00