Commit graph

426 commits

Author SHA1 Message Date
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
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
856587ff63 Use latest skylighting; ensure no duplicate ids on code lines.
The line identifiers are built using the code block's identifier
as a prefix. If the code block has null identifier, we use
"cb1", "cb2", etc.

Closes #4031.
2017-11-02 16:03:40 -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
Alexander Krotov
3cee9c8976 FB2 writer: Add "unrecognised" genre to <title-info>
XML schema requires at least one genre.
2017-11-01 13:31:16 +03:00
Alexander Krotov
8a5541dca8 FB2 writer: remove <annotation> from <body>
<annotation> is not allowed inside <body> according to FictionBook2 XML schema. Besides that, the same information is already placed inside <description>.

Related bug: #2424
2017-11-01 13:08:52 +03:00
John MacFarlane
9b513b8a7a
Merge pull request #4009 from mb21/html-class-names
HTML Writer: consistently use dashed class-names
2017-11-01 00:39:08 -04:00
John MacFarlane
eef8118af0
Merge pull request #4008 from labdsf/fb2-bullets
FB2 writer: make bullet lists consistent with ordered lists
2017-11-01 00:38:02 -04:00
John MacFarlane
1f393f1a8b
Merge pull request #4001 from labdsf/fb2-tests
Add new style FB2 tests
2017-11-01 00:37:29 -04:00
John MacFarlane
32f6938605 Properly pass through author metadata in JATS writer.
Closes #4020.
2017-10-31 21:27:08 -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