Commit graph

13774 commits

Author SHA1 Message Date
John MacFarlane
f19286cf12 DocBook reader: don't squelch space at end of emphasis element.
Instead, include it after the emphasis.  Closes #6719.

Same fix was made for other inline elements, e.g. strikethrough.
2020-10-08 21:27:52 -07:00
John MacFarlane
dd3c4000ff Small improvements to BibTeX parser. 2020-10-08 20:48:19 -07:00
John MacFarlane
0cfba4e36e Fixed some bibtex comments in tests (closing }). 2020-10-08 20:42:36 -07:00
John MacFarlane
480f582664 Export ParseError from T.P.Parsing. 2020-10-08 18:55:20 -07:00
John MacFarlane
84eea72e79 MANUAL: Add note about lualatex using selnolig. 2020-10-08 17:25:36 -07:00
John MacFarlane
2054bcbff6 Fix custom writer test.
The custom writer is now less aggressive about escaping `"`.
2020-10-08 12:32:42 -07:00
John MacFarlane
641849b70a Be less aggressive about using quotes for YAML values.
We need quotes if `[` or `{` or `'` is at the beginning of
the line, but not otherwise.
2020-10-08 10:54:53 -07:00
William Lupton
36e010cb4a
Fix apparent typos in sample.lua (#6729) 2020-10-08 09:42:36 -07:00
John MacFarlane
5a54595ae0 Use ghc 8.8.4 for CI build on macOS, because it is pre-installed. 2020-10-08 09:12:29 -07:00
John MacFarlane
2566ff6624 Qualify some uses of fail to avoid ambiguity. 2020-10-08 09:12:29 -07:00
Ian Max Andolina
d1e1898c52
Add info on how to debug Lua filters (#6732)
Add info on debugging Lua filters.
2020-10-08 11:56:08 +02:00
John MacFarlane
1be0f0fba8 Use double quotes for YAML metadata.
Closes #6727.
2020-10-07 23:05:51 -07:00
John MacFarlane
a520181cdb Use golden test framework for command tests.
This means that `--accept` can be used to update expected output.
2020-10-07 22:33:44 -07:00
John MacFarlane
6f2019ac08 Remove redundant import. 2020-10-07 16:01:30 -07:00
John MacFarlane
5b4a606265 Remove redundant import. 2020-10-07 16:01:10 -07:00
John MacFarlane
428f8b4d20 Raise informative errors when YAML metadata parsing fails.
Closes #6730.

Previously the command would succeed, returning empty metadata,
with no errors or warnings.

API changes:

- Remove now unused CouldNotParseYamlMetadata constructor for
  LogMessage (T.P.Logging).

- Add 'Maybe FilePath' parameter to yamlToMeta in T.P.Readers.Markdown.
2020-10-07 13:12:32 -07:00
John MacFarlane
69b030c7df Cleaner solution to #6723. 2020-10-07 11:29:05 -07:00
John MacFarlane
1742821c3e Fix URL prefixes in citations also when they occur in notes.
Update chicago-fullnote-bibliography.csl and adjust tests.

Closes #6723.
2020-10-07 11:23:28 -07:00
John MacFarlane
3b2dd1e1b3 Use lastest citeproc. 2020-10-07 11:23:15 -07:00
John MacFarlane
d2e4a83dc6 Use latest citeproc.
Better solution to the problem of entities in CSL JSON output.
2020-10-07 09:31:44 -07:00
John MacFarlane
fd3809c33f Unescape entities in writing CSL JSON.
The renderCslJson function escapes `<`, `>`, and `&` as entities.
This is appropriate when generating HTML, but in CSL JSON
these are supposed to appear unescaped.

Closes jgm/citeproc#17.
2020-10-06 22:29:25 -07:00
Diego Balseiro
eda5540719
DOCX reader: Allow empty dates in comments and tracked changes (#6726)
For security reasons, some legal firms delete the date from comments and
tracked changes.

* Make date optional (Maybe) in tracked changes and comments datatypes
* Add tests
2020-10-06 21:03:00 -07:00
John MacFarlane
a27a0b5419 Incorporate https://doi.org/ prefix added by CSL style...
...into linked DOI, and similarly for other URLs linked in the
bibliography.  We want to avoid having a URL in which only the latter
part is linked.  Closes #6723.
2020-10-06 19:20:00 -07:00
John MacFarlane
a78fd5dbc0 Fix URL for "short DOIs" in citations. See #6723.
Short DOIs begin 10/abcd and should be links to
`https://doi.org/abcd` (omitting the `10/`).
2020-10-06 17:33:25 -07:00
John MacFarlane
d4707ee8bd Run nightly one hour later. 2020-10-05 23:59:17 -07:00
John MacFarlane
97695a2bcc Fixed regresison in last commit.
Parsing of YAML bibliographies was broken; this fixes it.
2020-10-05 23:57:38 -07:00
John MacFarlane
3e7ca707c9 Removed the idpred from metaValueToReference.
This isn't really necessary; we do filtering at other points now.
2020-10-05 21:15:20 -07:00
John MacFarlane
6a32ea71ea Add yamlToRefs, yamlBsToRefs.
T.P.Readers.Markdown now exports yamlToRefs. [API change]

T.P.Readers.Metadata exports yamlBsToRefs. [API change]

These allow specifying an id filter so we parse only references
that are used in the document.  Improves timing with a 3M
yaml references file from 36s to 17s.
2020-10-05 21:07:47 -07:00
John MacFarlane
89e4f1bf9a Improve searching for CSL files...
...and CSL abbreviation files.  Use resource path to search
in both USERDATADIR/csl and USERDATADIR/csl/dependent.

Also, add .csl or .json extension as needed, so you can just
do --csl zoology.
2020-10-05 17:23:50 -07:00
John MacFarlane
4dac62ef3a Use yamlToMeta for yaml bibliography
This speeds up parsing of external yaml bibliographies considerably
(in one test 36s -> 17s).
2020-10-05 16:58:58 -07:00
John MacFarlane
128991d4a4 Add filtering to metaValueToReference, and check other-ids field too. 2020-10-05 16:35:51 -07:00
Albert Krewinkel
68454e0812
doc/lua-filters.md: document Underline type and constructor 2020-10-04 21:55:48 +02:00
John MacFarlane
10b5abb9a0 Try to fix Windows CI by installing happy first.
We're having the build fail with

```
windows\ghc-8.6.5\mingw\bin\strip.exe: unable to rename 'C:\sr\snapshots\c886f694\bin\happy.exe'; reason: File exists
```
2020-10-04 08:33:16 -07:00
Albert Krewinkel
01a6b071fa
Sort languages in --list-highlight-languages output (#6718)
Languages appear to be sorted by their long name, which leads to
unexpected results: e.g., the long name of *m4* is *GNU m4*, so it is
listed between *gnuassembler* and *go*.
2020-10-04 08:03:42 -07:00
Albert Krewinkel
18c11f85d7
Use HLint argument --color=auto
Using `--color`, which is equivalent to `--color=always`, causes
problems when used in situations where colors are not supported, e.g.,
in combination with Emacs.  Detection of color-supporting environments
seems reliable, so no adverse effects are expected from this change.
2020-10-04 15:03:16 +02:00
John MacFarlane
7d54e79091 Use latest citeproc.
Update chicago-fullnute-bibliography test, which is now correct.
2020-10-03 16:07:55 -07:00
Michael Hoffmann
74bd5a4f47
Docx writer: better handle list items whose contents are lists (#6522)
If the first element of a bulleted or ordered list is another list,
then that first item will disappear if the target format is docx. This
changes the docx writer so that it prepends an empty string for those
cases. With this, no items will disappear.

Closes #5948.
2020-10-02 09:30:05 -07:00
John MacFarlane
27b4c21f72 Update to lastest citeproc 2020-10-01 22:07:55 -07:00
niszet
7d97bf7a8c
Syntax highlight for inline code of OpenDocument (#6711)
To implement Syntax highlighting for OpenDocument, inlineToOpenDocument in OpenDocument Writer is updated based on Docx Writer.
This commit is only for inline Code because update of CodeBlock needs structual change of output document.
Currently, styles are not generated automatically in styles.xml. To implement it, additional commit for ODT Writer is needed.
Although styles are not included in styles.xml, output file can be shown in LibreOffice(7.0.0.3) like normal characters.
2020-10-01 09:55:16 -07:00
John MacFarlane
46dffbd8e5 Use latest citeproc. 2020-09-27 23:52:28 -07:00
John MacFarlane
5e70f774ec Fix redundant import warning. 2020-09-27 23:32:45 -07:00
John MacFarlane
eff6b8f27d Use latest citeproc. 2020-09-27 16:03:31 -07:00
Nils Carlson
ae4dcc0d4a
OpenDocument Writer: Implement table cell alignment (#6700)
Co-authored-by: Mauro Bieg <mb21@users.noreply.github.com>
2020-09-27 11:21:53 -07:00
John MacFarlane
3abfcbeef7 Use latest citeproc. 2020-09-26 17:13:55 -07:00
John MacFarlane
9061635a6a Use latest citeproc. 2020-09-26 15:05:08 -07:00
John MacFarlane
a822067903 Fix short-title.
We were getting null short-titles generated, and that
was creating wrong citations in some cases.

Close #6702.
2020-09-26 14:28:28 -07:00
John MacFarlane
5a388ab2f5 Allow gfm_auto_identifiers, ascii_identifiers extensions for docx. 2020-09-25 09:53:56 -07:00
John MacFarlane
188c444990 RST reader: apply .. class:: directly to following Header.
rather than creating a surrounding Div.

Closes #6699.
2020-09-25 09:06:15 -07:00
Albert Krewinkel
6119125a8b
Org reader: fix HLint warnings 2020-09-25 09:44:00 +02:00
Albert Krewinkel
29baaa2acb
doc/org.md: add section on tables 2020-09-25 09:44:00 +02:00