John MacFarlane
03496d1810
Test for #4113 .
...
Closes #4113 .
2017-12-03 20:15:40 -08:00
John MacFarlane
d6c58eb836
Docx reader: don't strip out empty paragraphs.
...
We now have the `--strip-empty-paragraphs` option for that,
if you want it. Closes #2252 .
Updated docx reader tests.
We use stripEmptyParagraphs to avoid changing too
many tests. We should add new tests for empty paragraphs.
2017-12-02 16:51:31 -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
Alexander Krotov
7751391fce
Muse reader: correctly remove indentation from notes
...
Exactly one space is required and considered to be part of the marker.
2017-11-29 05:12:25 +03:00
John MacFarlane
5a225aa603
Temporarily disable round-trip block test for muse reader.
...
See #4107 .
2017-11-28 16:13:01 -08:00
John MacFarlane
8b0b4cd848
Update tests for new skylighting.
2017-11-28 10:49:42 -08:00
Alexander Krotov
c2993a6fc6
Muse reader: parse "~~" as non-breaking space in Emacs mode
2017-11-27 12:25:06 +03:00
Alexander Krotov
00004f042c
Muse reader: make code blocks round trip
2017-11-27 04:54:23 +03:00
Alexander Krotov
bdad8c1d69
Muse reader: drop common space prefix from list items
2017-11-26 22:14:18 +03:00
Alexander Krotov
a8ac673285
Muse reader: Add partial round trip test
2017-11-26 02:01:39 +03:00
Alexander Krotov
ea2ea455b3
Muse reader: don't interpret XML entities
2017-11-25 22:46:25 +03:00
Alexander Krotov
77af25b4c3
Muse reader: parse markup in definition list terms
2017-11-24 14:02:43 +03:00
Alexander Krotov
137c7c2a65
Muse reader: allow definition to end with EOF
2017-11-24 13:16:09 +03:00
Alexander Krotov
fe74436540
Muse writer: test that inline math conversion result is normalized
...
Without normalization this test produced
<em>a</em><em>b</em><em>c</em>
2017-11-24 12:35:25 +03:00
Alexander Krotov
0cfd764d27
Muse: move inline list normalization to writer
2017-11-24 12:17:20 +03:00
Albert Krewinkel
cd85c73ded
Org reader: allow empty list items
...
Fixes : #4090
2017-11-22 22:53:24 +01:00
Alexander Krotov
75e2a1104c
Muse reader: allow list items to be empty
2017-11-22 18:49:07 +03:00
Alexander Krotov
0b63ac2db1
Muse reader: add ordered list test
2017-11-22 18:48:45 +03:00
Alexander Krotov
454062eccd
Muse writer: escape hash symbol
2017-11-22 16:17:30 +03:00
Alexander Krotov
c8ab4789b6
Muse reader: add more multiline definition tests
2017-11-22 15:23:09 +03:00
John MacFarlane
3fdf04614a
Update tests for skylighting changes.
2017-11-21 22:57:10 -08:00
Alexander Krotov
7e42857ed8
Muse writer: escape "----" to avoid accidental horizontal rules
2017-11-22 01:39:20 +03:00
Alexander Krotov
351765d4ad
Muse reader: concatenate inlines of the same type
2017-11-22 01:22:43 +03:00
Alexander Krotov
df3a80cc97
Muse writer: escape only </code> inside code tag
...
Additional <verbatim> is not needed as <code> is verbatim already.
2017-11-22 01:22:43 +03:00
Alexander Krotov
6c17117ef2
Muse reader: add inline <literal> support
2017-11-21 19:53:55 +03:00
Alexander Krotov
59f537c31f
Muse reader: test <literal> blocks
2017-11-21 19:01:53 +03:00
Albert Krewinkel
849900c516
data/pandoc.lua: enable table-like behavior of attributes ( #4080 )
...
Attribute lists are represented as associative lists in Lua. Pure
associative lists are awkward to work with. A metatable is attached to
attribute lists, allowing to access and use the associative list as if
the attributes were stored in as normal key-value pair in table.
Note that this changes the way `pairs` works on attribute lists. Instead
of producing integer keys and two-element tables, the resulting iterator
function now returns the key and value of those pairs. Use `ipairs` to
get the old behavior.
Warning: the new iteration mechanism only works if pandoc has been
compiled with Lua 5.2 or later (current default: 5.3).
The `pandoc.Attr` function is altered to allow passing attributes as
key-values in a normal table. This is more convenient than having to
construct the associative list which is used internally.
Closes #4071
2017-11-20 09:37:40 -08:00
Alexander Krotov
82bcda80c6
Muse reader: count only one space as part of list item marker
2017-11-19 04:40:00 +03:00
Alexander Krotov
163af3fdee
Muse reader: produce SoftBreaks on newlines
...
Now wrapping can be preserved with --wrap=preserve
2017-11-19 02:37:52 +03:00
Albert Krewinkel
53aafd6643
Lua filters: preload text module ( #4077 )
...
The `text` module is preloaded in lua. The module contains some UTF-8
aware string functions, implemented in Haskell. The module is loaded on
request only, e.g.:
text = require 'text'
function Str (s)
s.text = text.upper(s.text)
return s
end
2017-11-18 13:24:06 -08:00
Alexander Krotov
6018a2324d
Muse reader: Add Text::Amuse footnote extensions
...
Footnote end is indicated by indentation,
so footnotes can be placed anywhere in the text,
not just at the end of it.
2017-11-18 23:43:02 +03: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
Alexander Krotov
3a83b3843d
Replace "emacs" extension with "amuse" extension
...
It makes clear that extension is related to Muse markup.
2017-11-13 18:41:49 +03: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
Alexander Krotov
df4cb20f29
Muse reader: accept Emacs Muse definition lists
...
Emacs Muse does not require indentation.
2017-11-12 18:08:41 +03: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
b2bde69384
Fix test output for latest skylighting.
2017-11-04 22:18:13 -07:00
John MacFarlane
fe42c175eb
Revert "Better indentation under headers in org mode output."
...
This reverts commit 1a81751cef
.
2017-11-04 11:32:47 -07:00
John MacFarlane
1a81751cef
Better indentation under headers in org mode output.
...
See #4036 .
Close examination by org experts needed, to ensure that
nothing breaks.
2017-11-04 11:25:38 -07: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
d35417f8a8
Test case change for texmath 0.10.
2017-11-04 10:23:02 -07:00
John MacFarlane
a41015b929
Updated tests.
2017-11-03 11:46:15 -07:00