Commit graph

211 commits

Author SHA1 Message Date
Alexander Krotov
1e21cfb251 Muse writer: don't wrap note references to the next line
Closes #4172.
2017-12-19 13:30:48 +03:00
Alexander Krotov
ef8430e702 Fix for #4171 fix: don't wrap note references after SoftBreak 2017-12-19 13:30:48 +03:00
John MacFarlane
c0cc9270cb Org writer: don't allow fn refs to wrap to beginning of line.
Otherwise they can be interpreted as footnote definitions.

Closes #4171.
2017-12-18 16:33:52 -08:00
John MacFarlane
808f6d3fa1 OPML reader: enable raw HTML and other extensions by default for notes.
This fixes a regression in 2.0.

Note that extensions can now be individually disabled, e.g.
`-f opml-smart-raw_html`.

Closes #4164.
2017-12-17 09:52:53 -08:00
John MacFarlane
044d58bb24 Fixed regression in LateX tokenization.
This mainly affects the Markdown reader when parsing
raw LaTeX with escaped spaces.  Closes #4159.
2017-12-15 09:45:29 -08:00
John MacFarlane
b94f1e2045 RST reader: more accurate parsing of references.
Previously we erroneously included the enclosing
backticks in a reference ID (closes #4156).

This change also disables interpretation of
syntax inside references, as in docutils.
So, there is no emphasis in

    `my *link*`_
2017-12-14 12:48:43 -08:00
John MacFarlane
7093a3b44c Markdown: Improved computation of relative cell widths in pipe tables. 2017-12-12 15:36:29 -08:00
John MacFarlane
67b6abc806 LaTeX reader: fix \ before newline.
This should be a nonbreaking space, as long as it's not
followed by a blank line. This has been fixed at the tokenizer
level.

Closes #4134.
2017-12-08 16:34:15 -08:00
John MacFarlane
f6007e7146 Markdown reader: accept processing instructions as raw HTML.
Closes #4125.
2017-12-06 16:05:50 -08:00
John MacFarlane
6a2562efb5 Rewrite empty_paragraphs test so it will run on Windows. 2017-12-04 15:41:09 -08:00
John MacFarlane
fac3953abf Markdown reader: Don't parse native div as table caption.
Closes #4119.
2017-12-04 15:04:47 -08:00
John MacFarlane
ae60e0196c Add empty_paragraphs extension.
* Deprecate `--strip-empty-paragraphs` option.  Instead we now
  use an `empty_paragraphs` extension that can be enabled on
  the reader or writer.  By default, disabled.

* Add `Ext_empty_paragraphs` constructor to `Extension`.

* Revert "Docx reader: don't strip out empty paragraphs."
  This reverts commit d6c58eb836.

* Implement `empty_paragraphs` extension in docx reader and writer,
  opendocument writer, html reader and writer.

* Add tests for `empty_paragraphs` extension.
2017-12-04 14:56:57 -08:00
John MacFarlane
03496d1810 Test for #4113.
Closes #4113.
2017-12-03 20:15:40 -08:00
John MacFarlane
1193c1a505 LaTeX writer: allow specifying just width or height for image size.
Previously both needed to be specified (unless the image was
being resized to be smaller than its original size).

If height but not width is specified, we now set width to
textwidth (and similarly if width but not height is specified).
Since we have keepaspectratio, this yields the desired result.
2017-12-01 21:18:29 -08:00
John MacFarlane
b2a190546d Revert "LaTeX writer: Add keepaspectratio to includegraphics..."
This reverts commit 171187a452.
2017-12-01 13:51:33 -08:00
John MacFarlane
171187a452 LaTeX writer: Add keepaspectratio to includegraphics...
...if only one of height/width is given.
2017-11-30 16:03:28 -08:00
John MacFarlane
03ddac451e Support beamer \alert in LaTeX reader. Closes #4091. 2017-11-29 21:30:13 -08:00
John MacFarlane
508aab0bd5 Text.Pandoc.Parsing.uri: allow & and = as word characters.
This fixes a bug where pandoc would stop parsing a URI with an
empty attribute:  for example, `&a=&b=` wolud stop at `a`.
(The uri parser tries to guess which punctuation characters
are part of the URI and which might be punctuation after it.)

Closes #4068.
2017-11-14 22:08:14 -08:00
John MacFarlane
51897937cd LaTeX reader: allow optional arguments on \footnote.
Closes #4062.
2017-11-13 21:19:38 -08:00
John MacFarlane
8d6e0e516a Markdown writer: fix bug with doubled footnotes in grid tables.
Closes #4061.
2017-11-13 21:12:04 -08:00
John MacFarlane
eeaa3b048c LaTeX reader: support column specs like *{2}{r}.
This is equivalent to `rr`.  We now expand it like a macro.

Closes #4056.
2017-11-12 14:46:29 -08:00
John MacFarlane
7ba0ae8b4d LaTeX reader: allow optional args for parbox.
See #4056.
2017-11-12 14:19:58 -08:00
John MacFarlane
fb5ba1bb00 Fixed YAML metadata with "chomp" (|-).
Previously if a YAML block under `|-` contained
a blank line, pandoc would not parse it as metadata.
2017-11-11 10:17:53 -05:00
John MacFarlane
1592d38821 Allow fenced code blocks to be indented 1-3 spaces.
This brings our handling of them into alignment with
CommonMark's.

Closes #??.
2017-11-09 23:22:44 -05:00
John MacFarlane
fef5770591 Fix regression with --metadata.
It should replace a metadata value set in the document
itself, rather than creating a list including a new value.

Closes #4054.
2017-11-08 21:54:23 -08:00
John MacFarlane
8e53489cbc Fix strikethrough in gfm writer.
Previously we got a crash, because we were trying to print
a native cmark STRIKETHROUGH node, and the commonmark writer
in cmark-github doesn't support this.  Work around this by
using a raw node to add the strikethrough delimiters.

Closes #4038.
2017-11-04 10:35:52 -07:00
John MacFarlane
642d603666 Improved support for columns in HTML.
* Move as much as possible to the CSS in the template.
* Ensure that all the HTML-based templates (including epub)
  contain the CSS for columns.
* Columns default to 50% width unless they are given a width
  attribute.

Closes #4028.
2017-11-02 20:57:05 -07:00
John MacFarlane
6d00e6e8c3 Fixed revealjs slide column width issues.
* Remove "width" attribute which is not allowed on div.
* Remove space between `<div class="column">` elements,
  since this prevents columns whose widths sum to 100%
  (the space takes up space).

Closes #4028.
2017-11-02 10:23:04 -07:00
John MacFarlane
ed3d466384 Really fix #3989.
The previous fix only worked in certain cases.
Other cases with `>` in an HTML attribute broke.
2017-11-01 09:27:51 -07:00
John MacFarlane
f1ebdb8145 Updated command test for #3989.
We didn't fix it completely before.
2017-11-01 09:15:15 -07:00
John MacFarlane
fb6e5812bc Fixed regression in parsing of HTML comments in markdown...
and other non-HTML formats (`Text.Pandoc.Readers.HTML.htmlTag`).
The parser stopped at the first `>` character, even if it wasn't
the end of the comment.

Closes #4019.
2017-10-31 21:14:38 -07:00
John MacFarlane
0e57b8b85d Add Millimeter constructor to Dimension in ImageSize.
Minor API change.

Now sizes given in 'mm' are no longer converted to 'cm'.

Closes #4012.
2017-10-31 11:58:43 -07:00
John MacFarlane
5f9f458df3 LaTeX reader: handle % comment right after command.
For example

    \emph%
    {hi}
2017-10-31 11:31:35 -07:00
John MacFarlane
556c6c2c6d Markdown reader: make sure fenced div closers work in lists.
Previously the following failed:

    ::: {.class}
    1. one
    2. two
    :::

and you needed a blank line before the closing `:::`.
2017-10-31 10:57:20 -07:00
John MacFarlane
81610144f9 Make fenced_divs affect the Markdown writer.
If `fenced_divs` is enabled, fenced divs will be used.
2017-10-31 10:57:20 -07:00
John MacFarlane
244b42dbaf Added failing command test for #4007. 2017-10-30 11:04:40 -07:00
John MacFarlane
513b16a71b Fenced divs: ensure that paragraph at end doesn't become Plain.
Added test case.
2017-10-24 09:53:29 -07:00
John MacFarlane
ecb5475a2a Back to using [WARNING] and [INFO] to mark messages. 2017-10-23 23:01:37 -07:00
John MacFarlane
fda0c0119f Implemented fenced Divs.
+ Added Ext_fenced_divs to Extensions (default for pandoc Markdown).
+ Document fenced_divs extension in manual.
+ Implemented fenced code divs in Markdown reader.
+ Added test.

Closes #168.
2017-10-23 22:45:28 -07:00
John MacFarlane
896803b0d5 HTML reader: htmlTag improvements.
We previously failed on cases where an attribute contained a `>`
character. This patch fixes the bug.

Closes #3989.
2017-10-23 17:29:32 -07:00
John MacFarlane
1a82ecbb68 More pleasing presentation of warnings and info messages.
!! warning
-- info
2017-10-23 15:00:11 -07:00
John MacFarlane
cecf02e326 Fixed test for change in log level. 2017-10-23 11:20:22 -07:00
mb21
e2123a4033 LaTeX Reader: support \lettrine 2017-10-22 20:33:30 +02:00
John MacFarlane
28bb5d610d LaTeX reader: support \expandafter.
Closes #3983.
2017-10-19 13:23:50 -07:00
John MacFarlane
61641f996f Revised command test 3971 to work with Windows. 2017-10-16 22:51:25 -07:00
John MacFarlane
c40857b389 Improved handling of include files in LaTeX reader.
Previously `\include` wouldn't work if the included file
contained, e.g., a begin without a matching end.

We've changed the Tok type so that it stores a full SourcePos,
rather than just a line and column.  So tokens keeep track
of the file they came from. This allows us to use a simpler
method for includes, which doesn't require parsing the included
document as a whole.

Closes #3971.
2017-10-16 22:05:34 -07:00
John MacFarlane
9cf9a64923 RST writer: correctly handle inline code containing backticks.
(Use a :literal: role.)

Closes #3974.
2017-10-16 20:54:43 -07:00
John MacFarlane
cba18c19a6 RST writer: don't backslash-escape word-internal punctuation.
Closes #3978.
2017-10-16 20:39:19 -07:00
John MacFarlane
75d8c99c73 ConTeXt writer: Use identifiers for chapters.
Closes #3968.
2017-10-11 20:21:55 -07:00
John MacFarlane
8cd1e00bbc Add test - closes #3958. 2017-10-08 21:57:26 -07:00