Commit graph

1148 commits

Author SHA1 Message Date
Enno
dc8caf10df template:latex: make @ letter before using it (#5145)
This fixes the previous commit for parskip and KOMA classes.
2018-12-11 16:21:45 -05:00
Enno
84147eeff1 Let KOMA document class handle parskip when applicable (#5143)
This is just a change to the default latex template.
2018-12-11 13:22:31 -05:00
Jesse Rosenthal
0f736d778f Docx: add test for lists with level overrides. 2018-12-10 19:24:56 -05:00
John MacFarlane
d5e68d43be RST writer: don't wrap simple table header lines.
Closes #5128.
2018-12-05 17:10:33 -08:00
John MacFarlane
38200c0291 Strip out illegal XML characters in escapeXMLString.
Closes #5119.
2018-12-04 09:24:15 -08:00
John MacFarlane
4060df6891 Markdown writer: include needed whitespace after HTML figure.
We use HTML for a figure in markdown dialects that can't
represent it natively.

Closes #5121.
2018-12-03 15:10:13 -08:00
John MacFarlane
049a773b5b Fix custom tests. 2018-11-29 11:04:08 -08:00
John MacFarlane
77a40d6f34 MediaWiki writer: fix caption, use 'thumb' instead of 'frame'.
Captions used to have the word 'caption' prepended; this
has been removed.

Also, 'thumb' is used instead of 'frame' to allow images
to be resized.

Closes #5105.
2018-11-27 14:45:39 -08:00
John MacFarlane
83c0789205 Added test for #5053.
Note that the fix for #5099 also fixes #5053, a pandoc 2.4
regression in parsing underscore emphasis after symbols.
2018-11-25 22:50:16 -08:00
John MacFarlane
edc651059e Fix parsing of citations and quotes after parentheses.
Starting with pandoc 2.4, citations and quoted inlines
were no longer recognized after parentheses.  This is
because of commit 9b0bd4ec6f,
which is reverted here.

The point of that commit was to allow relocation of
soft line breaks to before an abbreviation, so that
a nonbreaking space could be added after the
abbreviation.  Now we simply leave the soft line
break in place, even though this means that
we won't get a nonbreaking space after "Mr."
at the end of a line (and in LaTeX this may
result in a longer intersentential space).
Those who care about this issue should take care
not to end lines with an abbreviation, or to
insert nonbreaking spaces manually.

Closes #5099.
2018-11-25 22:29:54 -08:00
John MacFarlane
c9691b91df OpenDocument writer: small amendment to #5095.
Level one lists should start at 0.5in rather than 0.75in.
(At least this is how LibreOffice behaves for me with a new
document.)
2018-11-22 22:02:08 -05:00
Nils Carlson
eb82fd6b5e ODT writer: Fix list indentation
Previously lists were indented by half an inch on the first line
for each level of nesting. This resulted in lists that looked like
this:

1.      The first line of the list point text
the second line of the same list point.

Fix this and bring style into line with libreoffice standards:

    1.  The first line of the list point text
        the second line of the list point text.
2018-11-22 17:18:09 +00:00
John MacFarlane
191141f27f Fix markdown-citations test for new abbreviations changes. 2018-11-20 23:56:13 -05:00
John MacFarlane
d333c283cc Docx writer: Fix bookmarks to headers with long titles.
Word has a 40 character limit for bookmark names.  In
addition, bookmarks must begin with a letter.  Since
pandoc's auto-generated identifiers may not respect
these constraints, some internal links did not work.

With this change, pandoc uses a bookmark name based
on the SHA1 hash of the identifier when the identifier
isn't a legal bookmark name.

Closes #5091.
2018-11-20 23:43:21 -05:00
John MacFarlane
a5910c0a31 AsciiDoc writer: improve ordered lists.
Use `.`+ as list markers to support nested ordered lists.  Closes #5087.
Support list number styles.  Closes #5089.
2018-11-19 13:17:33 -08:00
John MacFarlane
d532eb14eb HTML reader: allow tfoot before body rows.
Closes #5079.
2018-11-16 11:29:15 -08:00
John MacFarlane
e61f632531 HTML reader: parse <small> as a Span with class "small".
Closes #5080.
2018-11-15 22:36:01 -08:00
John MacFarlane
e61d1d0da9 Asciidoc writer: Render Spans using [#id .class]#contents#.
See #5080.
2018-11-15 22:29:15 -08:00
Alexander Krotov
367e8cac18 Muse reader: trim whitespace before parsing grid table cells 2018-11-14 19:17:05 +03:00
Alexander Krotov
c61b67410a Muse reader: add grid tables support 2018-11-14 17:58:44 +03:00
Alexander Krotov
195b3af8b6 Muse writer: indent simple tables only on the top level 2018-11-14 15:10:38 +03:00
John MacFarlane
1a102c11a9 Fix test case for #5014. 2018-11-13 14:50:26 -08:00
John MacFarlane
1cfdd3662f HTML reader: allow thead containing a row with td rather than th.
See #5014.

Note that this doesn't address the original issue in #5014,
only an unrelated side-issue.
2018-11-13 14:49:12 -08:00
Alexander Krotov
4079697281 Muse writer: output tables with one column as grid tables 2018-11-13 18:44:56 +03:00
John MacFarlane
52a57a5362 LaTeX writer: don't emit [<+->] unless beamer output,
even if `writerIncremental` is True.

See #5072.
2018-11-12 09:43:12 -08:00
John MacFarlane
5bc38a741b Exactly match GitHub's identifier generating algorithm.
See #5057.
2018-11-11 20:45:38 -08:00
John MacFarlane
a36d202e86 Text.Pandoc.Shared: add parameter to uniqueIdent, inlineListToIdentifier.
The parameter is Extensions. This allows these functions to
be sensitive to the settings of `Ext_gfm_auto_identifiers` and
`Ext_ascii_identifiers`.

This allows us to use `uniqueIdent` in the CommonMark reader,
replacing some custom code.

It also means that `gfm_auto_identifiers` can now be used
in all formats.

Semantically, `gfm_auto_identifiers` is now a modifier of
`auto_identifiers`; for identifiers to be set, `auto_identifiers`
must be turned on, and then the type of identifier produced
depends on `gfm_auto_identifiers` and `ascii_identifiers` are set.

Closes #5057.
2018-11-11 13:46:23 -08:00
John MacFarlane
65ca95eeea Texinfo writer: add blank line before @menu section.
Closes #5055.
2018-11-07 15:27:02 -08:00
John MacFarlane
5f030f3c2c Add command test for #5050. 2018-11-06 22:57:11 -08:00
John MacFarlane
985db7b0a8 ICML writer: consolidate adjacent strings, inc. spaces.
This avoids chunking up the output unnecessarily into
separate elements.
2018-11-06 22:54:25 -08:00
Alexander Krotov
928ec21732 Use OverloadedStrings extension to simplify Muse writer tests 2018-11-06 00:04:33 +03:00
quasicomputational
a747268823 CommonMark writer: respect --ascii (#5043) 2018-11-05 09:33:10 -08:00
John MacFarlane
511d647290 XML: toHtml5Entities: prefer shorter entities...
when there are several choices for a particular character.
2018-11-04 22:15:53 -08:00
Alexander Krotov
0c84630549 Muse writer: add support for --reference-location=
Address #107
2018-11-05 08:42:52 +03:00
John MacFarlane
2f65263851 AsciiDoc writer: use single-line section headers.
The underline style is now deprecated.
Previously `--atx-headers` would enable the single-line
style; now the single-line style is always used.

Closes #5038.
2018-11-03 12:03:05 -07:00
Yan Pashkovsky
43a0734f62 table tests 2018-11-02 22:42:51 -07:00
John MacFarlane
805b9f8a12 Roff reader: Improved handling of custom strings as arguments.
Added test.
2018-11-02 21:35:49 -07:00
John MacFarlane
e01ca77313 grofftest.sh - set resource path more appropriately. 2018-11-02 17:22:56 -07:00
John MacFarlane
c71fbb18e1 Improve test/grofftest.sh.
Use --resource-path.
Use iconv for latin1 man pages.
Recurse into subdirectories.
2018-11-02 10:59:38 -07:00
John MacFarlane
26341c1632 Implement --ascii for Markdown writer. 2018-11-01 16:31:04 -07:00
John MacFarlane
f379edc4ad HTML writer: use character entities references when possible for HTML5. 2018-11-01 16:08:27 -07:00
John MacFarlane
714e0eb834 ZimWiki writer: number ordered list items sequentially...
rather than always with 1.
2018-10-31 22:02:10 -07:00
John MacFarlane
e0290fd18b LaTeX writer: add newline if math ends in a comment.
This prevents the closing delimiter from being swalled
up in the comment.

Closes #4880.
2018-10-31 21:51:20 -07:00
John MacFarlane
3305a018bc Roff reader: properly handle unknown backslash escapes.
They are treated as regular characters, according to groff 7.

Cloess #5034.
2018-10-30 15:54:29 -07:00
John MacFarlane
4fe28e947a ZimWiki writer: remove extra indentation on lists.
Closes #4963.
2018-10-29 22:33:11 -07:00
John MacFarlane
c51be5dfc8 LaTeX reader: allow space at end of math after \.
Closes #5010.

Expose trimMath from T.P.Shared.
2018-10-29 22:20:14 -07:00
John MacFarlane
8d55dc10cd Roff tokenizer: better handling of escapes. 2018-10-28 21:37:57 -07:00
John MacFarlane
22755a35b7 Roff tokenizer: revamped font parsing using escapeArg.
Add support for \C'...' escapes.
2018-10-28 18:06:34 -07:00
Albert Krewinkel
6f29e1c9c1 T.P.Lua: rename runPandocLua to runLua (API change) 2018-10-28 12:08:52 -07:00
Albert Krewinkel
7f54f76e8b T.P.Lua: merge runLuaFilter into T.P.Filter.Lua (API change)
The function `runLuaFilter` was only used in Text.Pandoc.Filter.Lua, use
apply from the that module instead.
2018-10-28 12:08:52 -07:00
John MacFarlane
e96bb43ceb Man reader: allow block-level content in table cells.
Closes #5028.
2018-10-27 23:37:18 -07:00
Alexander Krotov
f8ca36525d Muse: Make tables round-trip 2018-10-28 03:52:35 +03:00
Alexander Krotov
e34a0703f5 Muse reader: try to parse lists before trying to parse table
This ensures that tables inside lists are parsed correctly.
2018-10-28 03:52:25 +03:00
Alexander Krotov
d8135b2e67 Remove misleading comment from Muse reader tests
pandoc follows Text::Amuse rules instead of being bug compatible with Emacs Muse
2018-10-27 23:43:23 +03:00
Alexander Krotov
d28dca57db Muse reader: forbid whitespace after opening and before closing markup elements
See https://github.com/melmothx/text-amuse/issues/44 for discussion on these rules
2018-10-27 23:35:11 +03:00
Alexander Krotov
1ca320e249 Muse reader: parse page breaks 2018-10-26 16:30:15 +03:00
John MacFarlane
5945c3b011 Man reader: support tables.
Closes #4982.
2018-10-25 22:13:41 -07:00
Albert Krewinkel
096cbe6987 Lua: allow access to pandoc state (#5015)
* Lua: allow access to pandoc state

Lua filters and custom writers now have read-only access to most fields
of pandoc's internal state via the global variable `PANDOC_STATE`.

* Lua: allow iterating through fields of PANDOC_STATE

* Lua filters doc: describe CommonState

* Lua filters doc: mention global variable PANDOC_STATE

* Lua: add access to logs

Log messages can currently only be printed, but not decomposed.
2018-10-25 22:12:14 -07:00
Alexander Krotov
07fc850172 Muse writer: add support for grid tables 2018-10-25 18:35:02 +03:00
John MacFarlane
3a9f807052 GroffChar: added @ to list of standard escapes.
Because we use it as a delimiter for tables (in man)
and for math (in ms).
2018-10-24 08:59:10 -07:00
Alexander Krotov
f859162554 Vimwiki reader: test empty preformatted text 2018-10-24 15:07:05 +03:00
John MacFarlane
8efb8975ed Groff writer character escaping changes.
T.P.GroffChar:  replaced `essentialEscapes` with `manEscapes`,
which includes all the escapes mentioned in the groff_man manual.

T.P.Writers.Groff: removed escapeCode; changed parameter on
escapeString from Bool to new type `EscapeMode`.
Rewrote `escapeString`.
2018-10-23 21:44:07 -07:00
John MacFarlane
bda1c0da81 Man reader: Handle optional argument in ME, UE macros.
Closes #4995.
2018-10-22 23:56:02 -07:00
John MacFarlane
261cbad0ef Groff writers escaping changes.
- Improve escaping of accented characters with `--ascii`.
  Combining accents are now handled properly.
- Don't escape spaces and tabs in code blocks. This doesn't
  seem to be necessary.
2018-10-22 23:48:12 -07:00
Brian Leung
7eea5c62ed LaTeX reader: add support for nolinkurl command. (#4992) 2018-10-22 23:36:44 -07:00
Alexander Krotov
4275d58a9f Muse writer: do not insert newline before lists 2018-10-23 03:38:59 +03:00
John MacFarlane
0327226d4c Man reader: don't parse \[ul] as unicode escape. 2018-10-22 12:05:34 -07:00
John MacFarlane
4625150f4c Man reader: fix code block tests.
They incorporated a spurious newline which needs to be
removed.
2018-10-21 23:01:58 -07:00
John MacFarlane
382763a7db Man reader: support .ds, .ds1; also fix macro arguments.
Closes #4997.
2018-10-21 22:00:50 -07:00
Alexander Krotov
875e33ecf6 Muse reader: allow footnotes to start with empty line
A space character was required after footnote marker, now newline is allowed.
2018-10-22 03:05:17 +03:00
John MacFarlane
1238a57456 Man reader: Moved handling of B, I, BI, IB, etc. to parsing phase.
Ultimately groff lexing should not handle man-specific macros.
This approach also gives more correct results for the test case.
2018-10-21 12:43:44 -07:00
John MacFarlane
25248c7a37 Man reader: move macro resolution to lexer phase.
We also introduce a new type ManTokens (a sequence of tokens)
and remove MComment.  This allows lexers to return empty strings
of tokens, or multiple tokens (as when macros are resolved).

One test still fails.  This needs to be fixed by moving handling
of .BI, .I, etc. to the parsing phase.
2018-10-21 12:08:54 -07:00
Alexander Krotov
a98e2b7c42 Muse writer: use lightweight markup after </em> tag 2018-10-21 20:23:10 +03:00
John MacFarlane
9593b375d7 Man reader: support UR/UE, MT/ME for links.
Closes #4989.
2018-10-20 22:55:20 -07:00
John MacFarlane
2b7a541dd0 Man reader: Fixed handling of nested fonts.
Closes #4978.
2018-10-20 22:41:39 -07:00
Alexander Krotov
8df59952bf Muse reader: allow empty headers
Previously empty headers caused parser to terminate without parsing the rest of the document.
2018-10-21 06:42:00 +03:00
John MacFarlane
f202279902 Man reader: Fix .B, .I, .BR, etc. 2018-10-20 16:40:44 -07:00
John MacFarlane
a9fc71118f Man reader: major restructuring, support macros.
- Improved support for custom macro definitions.
- LinePart type has been added. RoffStr is now one
  constructor of LinePart (the other being MacroArg).
- MComment has lost its argument.
- MEndMacro has been removed.
- MStr has been removed (we now simply use LinePart).
- Macros now store a list of tokens.
- Each macro argument is a [LinePart], instead of a LinePart.
- .BR now behaves as documented in man (and doesn't create a link).
2018-10-20 15:57:34 -07:00
John MacFarlane
8d4027da4d Man reader: block quotes (using RS..RE). 2018-10-20 10:07:28 -07:00
John MacFarlane
1b19e79650 Man reader: parse TP as definition lists.
Closes #4981.
2018-10-20 10:00:50 -07:00
John MacFarlane
62566c8182 Man reader: handle shift in list style.
Closes #4987.
2018-10-20 09:30:37 -07:00
Jesse Rosenthal
11e681edac Powerpoint tests: test raw openxml
Output files confirmed not to be corrupt, and with content as
expected, on PowerPoint 2013 on Windows 10 (virtualbox on linux).
2018-10-20 09:00:23 -04:00
John MacFarlane
c60ac7c9ab Man reader: improve treatment of .TH.
This should just add to metadata (title, date, section),
and not produce a level-1 header. (That might be done
in the template, depending on the output format.)
2018-10-19 23:55:01 -07:00
John MacFarlane
7dd06e96d7 Man reader: Improved header parsing.
- .SH should be level 1, .SS level 2.
- The header title can come on the next line.
2018-10-19 23:27:04 -07:00
John MacFarlane
13e443d7cc Man writer: avoid unnecessary .RS/.RE pair in defn lists.
When the definition is just one paragraph, we don't need
the `.RS\n.RE`.
2018-10-19 23:01:02 -07:00
John MacFarlane
f5704fac97 Man reader: properly handle multi-block list items.
Closes #4985.
2018-10-19 22:54:05 -07:00
John MacFarlane
790ada8946 Man reader: Added more tests for escapes.
Closes #4983.
2018-10-19 15:36:43 -07:00
John MacFarlane
56c4a11f97 Man reader: minor improvements.
use `trimInlines` for Para content to avoid leading and
trailing spaces.

Fix handling of \" in middle of line.

Add more tests for escapes.
2018-10-19 15:17:53 -07:00
John MacFarlane
e6772360f6 More man reader test updates. 2018-10-19 14:59:11 -07:00
John MacFarlane
2ee9cdcc60 Update tests for last change to man reader. 2018-10-19 14:27:13 -07:00
John MacFarlane
400e87df1d Update man reader tests. 2018-10-18 23:54:13 -07:00
John MacFarlane
7d5b25d6d6 GroffChar: fixed interpretation of \-.
It is the ascii - sign, not the unicode hyphen.
2018-10-18 23:54:13 -07:00
John MacFarlane
94c73e84d5 Merge branch 'Yanpas-groff_reader' 2018-10-18 20:58:46 -07:00
John MacFarlane
efbb329f1a Groff escaping changes.
- `--ascii` is now turned on automatically for man output, for
  portability.  All man output will be escaped to ASCII.
- In T.P.Writers.Groff, `escapeChar`, `escapeString`, and
  `escapeCode` now take a boolean parameter that selects
  ascii-only output.  This is used by the Ms writer for
  `--ascii`, instead of doing an extra pass after writing
  the document.
- In ms output without `--ascii`, unicode is used whenever
  possible (e.g. for double quotes).
- A few escapes are changed: e.g. `\[rs]` instead of `\\` for
  backslash, and `\ga]` instead of `` \` `` for backtick.
2018-10-18 10:21:34 -07:00
John MacFarlane
24f388e1a7 man/ms writers: use \[at] for escaped @. 2018-10-17 17:39:42 -07:00
John MacFarlane
f48960b75f Move common groff functions to Text.Pandoc.Writers.Groff
(unexported module).  These are used in both the man and ms
writers.

Moved groffEscape out of Text.Pandoc.Writers.Shared [cancels earlier
API change from adding it, which was after last release].

This fixes strong/code combination on man (should be `\f[CB]` not
`\f[BC]`), mentioned in #4973.

Updated tests.

Closes #4975.
2018-10-17 17:26:37 -07:00
Alexander Krotov
b3feaba6af Man writer: use \f[R] instead of \f[] to reset font
Fixes #4973
2018-10-17 18:29:07 +03:00
Alexander Krotov
6fc812485e Muse reader: allow examples to be indented with tabs 2018-10-17 18:17:30 +03:00
Alexander Krotov
1071732719 Muse reader: remove indentation from examples indicated by {{{ and }}} 2018-10-17 13:57:05 +03:00
John MacFarlane
5c42101ee9 Merge branch 'groff_reader' of https://github.com/Yanpas/pandoc into Yanpas-groff_reader 2018-10-16 18:39:20 -07:00
Yan Pas
7741cdbf04 added old-style test 2018-10-17 00:21:52 +03:00
John MacFarlane
885cbfd420 Only override --quickcheck-tests=N if N is not default value (100).
Some of the round-trip tests are set to do a maximum of 25
trials when the default value is given.

Closes #4956.
2018-10-15 22:15:43 -07:00
Yan Pas
ce27bf9a02 builders 2018-10-16 03:12:06 +03:00
John MacFarlane
6f6ad0514d LaTeX reader: make macroDef polymorphic and allow in inline context.
Otherwise we can't parse something like
```
\lowercase{\def\x{Foo}}
```
I have actually seen tex like this in the wild.
2018-10-15 11:46:31 -07:00
John MacFarlane
22f81f78bd Added failing test case for macros. 2018-10-15 00:37:17 -07:00
John MacFarlane
88faa45f1d Markdown writer: ensure blank between raw block and normal content.
Otherwise a raw block can prevent a paragraph from being
recognized as such.

Closes #4629.
2018-10-14 17:12:06 -07:00
John MacFarlane
cf8224045b Markdown reader: Fix awkward soft break movements before abbreviations.
Closes #4635.
2018-10-14 13:02:36 -07:00
Yan Pas
3fed62611e tests, commented debug functions 2018-10-14 00:57:15 +03:00
John MacFarlane
f5c64c3060 HTML reader: fix htmlTag and isInlineTag to accept processing instructions.
Fixes regression #3123 (since 2.0). Added regression test.
2018-10-11 09:58:25 -07:00
Alexander Krotov
6b8fd99dbd Test that Muse reader can parse code with = sign inside
(fixed by previous commit)
2018-10-10 03:27:36 +03:00
Alexander Krotov
d3b2161bd1 Muse reader: fix parsing of empty cells 2018-10-10 01:48:58 +03:00
Yan Pas
07b4d7b297 posix man files parsed successfully 2018-10-09 23:59:12 +03:00
John MacFarlane
30033f417f Docx writer: added framework for custom properties.
So far, we don't actually write any custom properties,
but we have the infrastructure to add this.

See #3034.
2018-10-09 10:38:50 -07:00
John MacFarlane
58eb78c437 Fixed tests for new skylighting. 2018-10-08 23:16:50 -07:00
John MacFarlane
a92e43575f LaTeX writer: with --biblatex, use \autocite when possible.
`\autocites{a1}{a2}{a3}` will not collapse the entries.
So, if we don't have prefixes and suffixes, we use instead
`\autocite{a1;a2;a3}`.

Closes #4960.
2018-10-08 20:47:09 -07:00
John MacFarlane
145710c4c3 RST reader: don't allow single-dash separator in headerless table.
Closes #4382.
2018-10-07 12:37:08 -07:00
John MacFarlane
b806bff5b4 LaTeX reader: fix bugs omitting raw tex.
The default is `-raw_tex`, so no raw tex should result
unless we explicitly say `+raw_tex`.  Previously some
raw commands did make it through.

Closes #4527.
2018-10-07 12:21:43 -07:00
John MacFarlane
08fef6b210 RST reader: pass through fields in unknown directives as div attributes.
This commit also adds support for `class` and `name` attributes to
directives in general.

Closes #4715.
2018-10-07 11:44:11 -07:00
Yan Pas
c7aa7a83dd test suite and more secapes 2018-10-07 19:55:10 +03:00
Yan Pas
27467189ab Merge branch 'master' into groff_reader 2018-10-07 18:10:01 +03:00
John MacFarlane
bd8a66394b RST writer: use simple tables when possible.
Closes #4750.

Text.Pandoc.Writers.Shared now exports hasSimpleCells [API change].
2018-10-06 22:33:24 -07:00
Brian Leung
e257b54124 Org reader: fix behavior for successive calls of #+EXCLUDE_TAGS. (#4951)
Calling `#+EXCLUDE_TAGS` multiple times should preserve the status of
the previously declared tags.
2018-10-05 22:21:20 -07:00
quasicomputational
6207bdeb68 CommonMark writer: add plain text fallbacks. (#4531)
Previously, the writer would unconditionally emit HTMLish output for
subscripts, superscripts, strikeouts (if the strikeout extension is
disabled) and small caps, even with raw_html disabled.

Now there are plain-text (and, where possible, fancy Unicode)
fallbacks for all of these corresponding (mostly) to the Markdown
fallbacks, and the HTMLish output is only used when raw_html is
enabled.

This commit adds exported functions `toSuperscript` and
`toSubscript` to `Text.Pandoc.Writers.Shared`.  [API change]

Closes #4528.
2018-10-05 21:33:14 -07:00
Brian Leung
a26b3a2d6a Org reader: Add partial support for #+EXCLUDE_TAGS option. (#4950)
Closes #4284.

Headers with the corresponding tags should not appear in the output.

If one or more of the specified tags contains a non-tag character
like `+`, Org-mode will not treat that as a valid tag, but will
nonetheless continue scanning for valid tags. That behavior is not
replicated in this patch; entering `cat+dog` as one of the entries in
`#+EXCLUDE_TAGS` and running the file through Pandoc will cause the
parser to fail and result in the only excluded tag being the default, `noexport`.
2018-10-05 14:28:17 -07:00
Nils Carlson
6304720d8d OpenDocument writer: Implement table caption numbering (#4949)
Implement table caption numbering with a format
"Table 1: <caption>".

Translations are enabled and numbering is consecutive for
captioned tables, uncaptioned tables are not enumerated.

Captioned figures are now also numbered consecutively
and uncaptioned figures are not enumerated.
2018-10-05 09:58:23 -07:00
Alexander Krotov
5f7799ac8f Muse reader: allow table caption to contain "+" 2018-10-05 11:58:41 +03:00
Nils Carlson
ecd4d5b8d8 OpenDocument writer: Implement figure numbering in captions (#4944)
Figure captions are now numbered 1, 2, 3, ... The format in
the caption is "Figure 1: <caption>" and so on.

This is necessary in order for libreoffice to generate an
Illustration Index (Table of Figures) for included figures.
2018-10-03 14:21:46 -07:00
John MacFarlane
f82d574d14 OpenDocument writer: improve bullet/numbering alignment.
This patch eliminates the large gap we used to have between
bullet and text, and also ensures that numbers in numbered
lists will be right-aligned.

Closes #4385.
2018-10-02 10:11:32 -07:00
John MacFarlane
36f1846cc3 Implement --ascii (writerPreferAscii) in writers, not App.
Now the `write*` functions for Docbook, HTML, ICML, JATS,
Man, Ms, OPML are sensitive to `writerPreferAscii`.  Previously
the to-ascii translation was done in Text.Pandoc.App, and
thus not available to those using the writer functions
directly.

In addition, the LaTeX writer is now sensitive to
`writerPreferAscii` and to `--ascii`.  100% ASCII
output can't be guaranteed, but the writer will use
commands like `\"{a}` and `\l` whenever possible,
to avoid emiting a non-ASCII character.

A new unexported module, Text.Pandoc.Groff, has been
added to store functions used in the different groff-based
writers.
2018-09-30 22:32:00 -07:00
John MacFarlane
190ee279c9 LaTeX reader: allow verbatim blocks ending with blank lines.
Closes #4624.
2018-09-29 10:57:11 -07:00
leungbk
4f9ab7e032 Parse empty argument array in inline src blocks.
`enclosedByPair` alone does not the handle the empty array properly since it uses `many1Till`.
2018-09-28 14:05:14 +02:00
John MacFarlane
53657798cd JATS writer: remove 'role' attribute on 'bold' and 'sc' elements.
The JATS spec does not allow these.

Closes #4937.
2018-09-27 13:18:06 -07:00
John MacFarlane
13f8f3c1a8 HTML, Muse reader tests: reduce time taken by round-trip test. 2018-09-27 09:47:09 -07:00
leungbk
6e8f31dab1 Force inline code blocks to honor export options.
`exportsCode` is moved from `Blocks.hs` to `Shared.hs` and exported accordingly.
2018-09-26 08:49:13 +02:00
Brian Leung
72363cd2fc Add support for multiprenote and multipostnote arguments in LaTeX. (#4930)
* Add support for multiprenote and multipostnote arguments.

The multiprenotes occur before the first prefix of a
multicite, and the multipostnotes follow the last suffix.

* Add test for multiprenote and multipostnote.
2018-09-25 20:49:13 -07:00
Albert Krewinkel
56fe5b559e
Use hslua v1.0.0 2018-09-24 20:11:27 +02:00
John MacFarlane
0272e63527
Merge pull request #4921 from pyssling/master
ODT Writer: Improve table header row style handling
2018-09-24 10:01:21 -07:00
Nils Carlson
ce6e9e8817 ODT Writer: Improve table header row style handling
This changes the way styles for cells in the header row
and normal rows are handled in ODT tables.

Previously a new (but identical) style was generated for
every table, specifying the style of the cells within the table.

After this change there are two style definitions for table cells,
one for the cells in the header row, one for all other cells.

This doesn't change the actual styles, but makes post-processing
changes to the table styles much simpler as it is no longer
necessary to introduce new styles for header rows and there are
now only two styles where there was previously one per table.
2018-09-23 22:04:32 +00:00
Alexander Krotov
389ffa3045 Muse reader tests: more tests
Check that indented blocks that end in self-terminating blocks (such as block tags and verse) can be terminated by paragraphs.
2018-09-22 20:28:11 +03:00
Alexander Krotov
dd5d234c6a Muse reader: do not allow code markup to be followed by digit 2018-09-21 13:07:56 +03:00
John MacFarlane
37c6f6adfe RST reader: fix bug with internal link targets.
They were gobbling up indented content underneath.
Closes #4919.
2018-09-20 11:15:03 -07:00
John MacFarlane
136bf901aa Markdown reader: distinguish autolinks in the AST.
With this change, autolinks are parsed as Links with
the `uri` class. (The same is true for bare links, if
the `autolink_bare_uris` extension is enabled.)  Email
autolinks are parsed as Links with the `email` class.
This allows the distinction to be represented in the
URI.

Formerly the `uri` class was added to autolinks by
the HTML writer, but it had to guess what was an autolink
and could not distinguish `[http://example.com](http://example.com)`
from `<http://example.com>`.  It also incorrectly recognized
`[pandoc](pandoc)` as an autolink.  Now the HTML writer
simply passes through the `uri` attribute if it is present,
but does not add anything.

The Textile writer has been modified so that the `uri`
class is not explicitly added for autolinks, even if it
is present.

Closes #4913.
2018-09-19 14:53:29 -07:00
Albert Krewinkel
dba5c8d4e3
Lua filter tests: produce better error on test failure 2018-09-19 21:36:19 +02:00
danse
db2a68d089 parse rST inlines containing newlines closing #4912
this eliminates a regression error introduced after pandoc 2.1.1,
affecting rST inline parsing. see the issue for details
2018-09-18 13:31:09 +02:00
John MacFarlane
44e4f7b292 Markdown reader: example_lists should work without startnum.
Closes  #4908.
2018-09-16 20:40:32 -07:00
Alexander Krotov
71776661cd Muse writer: replace newlines in strings with spaces 2018-09-16 21:05:57 +03:00
mb21
5347e9454f add test for --metadata-file 2018-09-15 17:06:10 +02:00
mb21
bd5500ba7f add test yaml-metadata-blocks.md 2018-09-15 12:10:10 +02:00
Alexander Krotov
3f8891b26f Enable tables in HTML round trip test 2018-09-11 19:24:00 +03:00
Alexander Krotov
ca420983aa HTML reader tests: accept Blocks in round trip test 2018-09-11 19:23:46 +03:00
Alexander Krotov
0ac3512cfe Muse reader tests: accept Blocks instead of Block in round trip test
This way testcase can be shrinked better up to removing all blocks completely.
2018-09-11 14:22:09 +03:00
Alexander Krotov
1aac754359 Muse writer: set envInsideBlock = True when rendering notes 2018-09-11 14:10:20 +03:00
Alexander Krotov
e6ba0cc893 HTML writer: always output <dt> element, even if it is empty
Fixes #4883
2018-09-11 13:20:11 +03:00
Alexander Krotov
165a61095c Muse writer: check for whitespace in the beginning and end of Str's 2018-09-11 11:49:11 +03:00
Alexander Krotov
cb28cab489 Muse writer: escape -, ; and > in the beginning of strings 2018-09-11 11:35:25 +03:00
Alexander Krotov
c899b4e89d Muse writer: escape list markers in the beginning of notes 2018-09-11 04:15:32 +03:00
Alexander Krotov
00b2b0feb6 Muse writer: normalize inline list before testing if tags should be used 2018-09-11 01:36:11 +03:00
Alexander Krotov
c2b97c4b80 Muse writer: use tags instead of lightweight markup for empty strings 2018-09-11 00:39:37 +03:00
J. B. Rainsberger
7b52d43877 Make HTML5 header easier to style precisely in default template (#4767)
Add the `title-block-header` identifier to the `header` element, to make it easier to style precisely.
2018-09-10 09:15:11 -07:00
Alexander Krotov
1b9dd3e06b Remove RawBlock from HTML round trip tests 2018-09-10 14:28:28 +03:00
Alexander Krotov
4467fe6d38 HTML reader: test round trip property 2018-09-10 12:15:27 +03:00
John MacFarlane
fa4ebd71a3 LaTeX reader: resolve \ref for figure numbers. 2018-09-09 22:53:18 -07:00
John MacFarlane
0b486e8672 Org writer: don't escape literal _, ^.
Org doesn't recognize these escapes.

Closes #4882.
2018-09-09 13:11:53 -07:00
John MacFarlane
a211edc819 HTML reader: parse <script type="math/tex tags as math.
These are used by MathJax.

Closes #4877.
2018-09-07 09:41:17 -07:00
Albert Krewinkel
275afec38a Org reader: respect export option p for planning info
Inclusion of planning info (*DEADLINE*, *SCHEDULED*, and *CLOSED*) can
be controlled via the `p` export option: setting the option to `t` will
add all planning information in a *Plain* block below the respective
headline.
2018-09-06 20:57:21 +02:00
Alexander Krotov
0b7001c318 Muse reader: close the </quote> in indented tag test
There is already a separate test for unclosed </quote>.
2018-09-06 19:57:24 +03:00
Albert Krewinkel
ceec26f647 Org reader: strip planning info from output
Planning info is parsed, but not included in the output (as is the
default with Emacs Org-mode).

Fixes: #4867
2018-09-05 17:12:54 +02:00
Alexander Krotov
bec2023265 hlint Muse writer tests 2018-09-04 11:00:44 +03:00
Alexander Krotov
66f3b00206 Remove redundant $ 2018-09-04 10:53:37 +03:00
Alexander Krotov
02e68859eb Muse reader: autonumber sections in the correct order
Parsing now stops at each section header to ensure the
header is registered before parsing of the next section starts.
2018-09-02 17:37:19 +03:00
Alexander Krotov
6ea6011ca6 Muse writer: use lightweight markup when possible 2018-09-02 03:29:27 +03:00
Alexander Krotov
23ed97f081 Muse reader: allow newline after opening "*" or "**"
Emacs Muse allows this.
2018-09-02 01:03:43 +03:00
Alexander Krotov
56685e8735 Muse reader: parse <verse> tag in one pass
instead of using parseFromString.

This change makes it possible to have verbatim </verse> tag
inside verse.
2018-08-31 16:43:07 +03:00
Alexander Krotov
d74c63d6d3 Fix a typo: s/afeter/after/ 2018-08-30 16:02:46 +03:00
John MacFarlane
85ed24e849 RSTR reader: don't skip link definitions after comments.
Closes #4860.
2018-08-29 14:40:04 -07:00
John MacFarlane
a2c4261b32 HTML reader: allow enabling raw_tex extension.
This now allows raw LaTeX environments, `\ref`, and `\eqref` to
be parsed (which is helpful for translation HTML documents using
MathJaX).

Closes #1126.
2018-08-24 18:04:00 -07:00
Alexander Krotov
937b92cd30 HTML reader: extract spaces inside links instead of trimming them
Fixes #4845
2018-08-22 12:43:15 +03:00
John MacFarlane
3b5949e8f2 LaTeX reader: support blockcquote, foreignblockquote from csquotes.
Also foreigncblockquote, hyphenblockquote, hyphencblockquote.

Closes #4848.  But note:   currently foreignquote will be
parsed as a regular Quoted inline (not using the quotes
appropriate to the foreign language).
2018-08-21 21:03:43 -07:00
John MacFarlane
a733068ebf LaTeX reader: support enquote*, foreignquote, hypphenquote...
from csquotes.  See #4848.  Still TBD: blockquote, blockcquote,
foreignblockquote.
2018-08-21 17:39:27 -07:00
John MacFarlane
42f4632e60 LaTeX reader: Support more text-mode accents.
Add support for `\|`, `\b`, `\G`, `\h`, `\d`, `\f`,
`\r`, `\t`, `\U`, `\i`, `\j`, `\newtie`, `\textcircled`.

Also fall back to combining characters when composed
characters are not available.

Closes #4652.
2018-08-17 23:19:38 -07:00
Marc Schreiber
175da00295 Add support for latex mintinline (#4365) 2018-08-17 20:57:36 -07:00
Joe Hermaszewski
822a071bb2 Haddock Writer: Use proper format for latex math in haddock (#4571).
Inline math in `\(..\)`, display math in `\[..\]`, tex is now used.
Previously we'd "fake it with unicode" and fall back to tex when
that didn't work.  But as of
3f50b95532
haddock supports latex math.
2018-08-17 20:50:45 -07:00
John MacFarlane
1b66865763 LaTeX reader: fix siunitx unit commands...
...they should only be recognized in siunitx contexts.

For example, `\l` outside of an siunitx context should be l-slash,
not l (for liter)!

Closes #4842.
2018-08-17 15:22:47 -07:00
John MacFarlane
2bc352f305 TEI template: improve publicationStmt.
Add support for publisher, address, pubPlace, and date variables.
2018-08-16 21:19:03 -07:00
John MacFarlane
13dea94a91 Markdown reader: Use "tex" instead of "latex" for raw tex-ish content.
We can't always tell if it's LaTeX, ConTeXt, or plain TeX.
Better just to use "tex" always.

Also changed:

ConTeXt writer: now outputs raw "tex" blocks as well as "context".
(Closes #969).

RST writer: uses ".. raw:: latex" for "tex" content.
(RST doesn't support raw context anyway.)

Note that if "context" or "latex" specifically is desired,
you can still force that in a markdown document by using
the raw attribute (see MANUAL.txt):

    ```{=latex}
    \foo
    ```

Note that this change may affect some filters, if they assume that raw
tex parsed by the Markdown reader will be RawBlock (Format "latex").
In most cases it should be trivial to modify the filters to accept
"tex" as well.
2018-08-15 10:25:12 -07:00
John MacFarlane
c27ce1e70e LaTeX reader: handle parameter patterns for \def.
For example:  `\def\foo#1[#2]{#1 and #2}`.

Closes #4768.  Also fixes #4771.

API change:  in Text.Pandoc.Readers.LaTeX.Types,
new type ArgSpec added.  Second parameter of Macro
constructor is now `[ArgSpec]` instead of `Int`.
2018-08-14 00:03:55 -07:00
John MacFarlane
919c50162c RST writer: render Divs with admonition classes as admonitions.
Also omit Div with class "admonition-title". These are generated
by the RST reader and should be omitted on round-trip.

Closes #4833.
2018-08-13 11:17:26 -07:00
John MacFarlane
c3f17cb0d7 RST writer: use .. container for generic Divs, instead of raw HTML. 2018-08-13 11:00:28 -07:00
John MacFarlane
6d14f53bd9 LaTeX reader: Allow % characters in URLs.
This affects `\href` and `\url`.  Closes #4832.
2018-08-12 16:46:48 -07:00
Alexander Krotov
81131ef5d1 Muse reader: don't allow digits after closing marker in lightweight markup
This change makes reader more compatible with Emacs Muse
2018-08-12 21:20:07 +03:00
John MacFarlane
b76203ccf1 Markdown reader: Properly handle boolean values in YAML metadata.
This fixes a regression in 2.2.3, which cause boolean values to
be parsed as MetaInlines instead of MetaBool.

Note also an undocumented (but desirable) change in 2.2.3:
numbers are now parsed as MetaInlines rather than MetaString.

Closes #4819.
2018-08-07 09:26:58 -07:00
John MacFarlane
94c3753c08 Fix parsing of embedded mappings in YAML metadata.
This fixes a regression in 2.2.3 which caused embedded mappings
(e.g. mappings in sequences) not to work in YAML metadata.

Closes #4817.
2018-08-06 12:32:04 -07:00
John MacFarlane
581a3514ca RST reader: improve parsing of inline interpreted text roles.
* Use a Span with class "title-reference" for the default
  title-reference role.
* Use B.text to split up contents into Spaces, SoftBreaks, and Strs
  for title-reference.
* Use Code with class "interpreted-text" instead of Span and Str for
  unknown roles.  (The RST writer has also been modified to round-trip
  this properly.)
* Disallow blank lines in interpreted text.
* Backslash-escape now works in interpreted text.
* Backticks followed by alphanumerics no longer end interpreted text.

Closes #4811.
2018-08-05 09:56:43 -07:00
John MacFarlane
f7dc3e7487 Added test case for #4669 to repository. 2018-08-05 09:21:45 -07:00
Francesco Occhipinti
2661658a69 RST writer: use titleblock instead of title variable for title block
Closes #4803

After this commit use `$titleblock$` in order to get what was contained
in `$title$` before, that is a title and subtitle rendered according to
the official rST method:
http://docutils.sourceforge.net/docs/user/rst/quickstart.html#document-title-subtitle. from

With this commit, the `$title$` and `$subtitle$` metadata are available and they
simply carry the metadata values.  This opens up more possibilities in templates.
2018-08-01 12:32:16 -07:00
John MacFarlane
78dca68a0a DocBook reader: metadata handling improvements.
Now we properly parse title and subtitle elements that are
direct children of book and article (as well as children of
bookinfo, articleinfo, or info).

We also now use the "subtitle" metadata field for subtitles,
rather than tacking the subtitle on to the title.
2018-07-30 14:38:38 -07:00
Albert Krewinkel
fb94c0f6a1 Lua Utils module: add function blocks_to_inlines (#4799)
Exposes a function converting which flattenes a list of blocks into a
list of inlines. An example use case would be the conversion of Note
elements into other inlines.
2018-07-30 10:55:25 -07:00
danse
be2d7921cb RST reader: remove support for nested inlines.
RST does not allow nested emphasis, links, or other inline
constructs.

Closes #4581, double parsing of links with URLs as
link text.  This supersedes the earlier fix for #4581
in 6419819b46.

Fixes #4561, a bug parsing with URLs inside emphasis.

Closes #4792.
2018-07-24 15:35:50 -07:00
John MacFarlane
50e8c3b107 MediaWiki writer: Avoid extra blank line in tables with empty cells.
Note that the old output is semantically identical, but the
new output looks better.

Closes #4794.
2018-07-24 11:38:24 -07:00
Albert Krewinkel
4e899eb9c8
Org reader: fix parsers relying on parseFromString
Emphasis was not parsed when it followed directly after some block types
(e.g., lists).

The org reader uses a wrapper for the `parseFromString` function to
handle org-specific state. The last position of a character allowed
before emphasis was reset incorrectly in this wrapper. Emphasized text
was not recognized when placed directly behind a block which the reader
parses using `parseFromString`.

Fixes: #4784
2018-07-23 22:05:41 +02:00
John MacFarlane
6419819b46 RST reader: fix double-link bug.
Link labels containing raw URLs were parsed as autolinks,
but links within links are not allowed.

Closes #4581.
2018-07-21 22:53:04 -07:00
John MacFarlane
34b229dd5a Fix for bug in parsing \include in markdown.
Starting in 2.2.2, everything after an `\input` (or `\include`)
in a markdown file would be parsed as raw LaTeX.
This commit fixes the issue and adds a regression test.

Closes #4781.
2018-07-19 17:44:16 -07:00
John MacFarlane
af445b34d8 Make markdown and github writers respect the emoji extension. 2018-07-15 16:02:46 -07:00
Anders Waldenborg
ec30fb37c1 Wrap emojis in span nodes (#4759)
Text.Pandoc.Emoji now exports `emojiToInline`, which returns a Span inline containing the emoji character and some attributes with metadata (class `emoji`, attribute `data-emoji` with emoji name).  Previously, emojis (as supported in Markdown and CommonMark readers, e.g "😄")
were simply translated into the corresponding unicode code point.  By wrapping them in Span
nodes, we make it possible to do special handling such as giving them a special font
in HTML output.  We also open up the possibility of treating them differently when the
`--ascii` option is selected (though that is not part of this commit).

Closes #4743.
2018-07-15 15:14:40 -07:00
Mauro Bieg
5809d5bef2 AsciiDoc Writer: escape square brackets at start of line (#4708)
closes #4545
2018-07-12 19:37:37 +02:00
Alexander Krotov
41cf6d540f More spellcheck 2018-07-02 19:07:28 +03:00
John MacFarlane
016e0a09e2 RST writer: don't treat 'example' as a syntax name.
This fixes conversions from org with example blocks.
Closes #4748.
2018-06-30 11:45:49 +02:00
Anders Waldenborg
904924d172 CommonMark reader: Handle ascii_identifiers extension (#4733)
Non-ascii characters were not stripped from identifiers even if the
`ascii_identifiers` extension was enabled (which is is by default for
gfm).

Closes #4742
2018-06-29 10:41:26 +02:00
Mauro Bieg
0459d1be26 TikiWiki reader: improve list parsing (#4723)
- remove trailing Space from list items
- parse lists that have no space after marker (fixes #4722)
2018-06-28 13:35:54 +02:00
Alexander Krotov
ebf4ed8944 Texinfo writer: use @sup and @sub instead of custom macros
Fixes #4728
2018-06-25 03:14:04 +03:00
John MacFarlane
48a505c5a0 Markdown reader: allow empty code spans.
E.g. `` ` ` ``.
2018-06-13 11:12:10 -07:00
Mauro Bieg
7e477db95c LaTeX Reader: parse figure label into Image id (#4704)
closes #4700
2018-06-13 10:41:30 -07:00
Alexander Krotov
b6305a63cd FB2 writer: convert Plain to Para in annotation
Address #2424
2018-06-12 15:32:30 +03:00
Alexander Krotov
54d16545c9 FB2 writer: fix order of items in title-info
Address issue #2424
2018-06-12 14:48:52 +03:00
John MacFarlane
a41222db3e Adjust command test not to use echo.
This is fraught on Windows.
2018-06-11 10:53:56 -07:00
John MacFarlane
edcfbccf5d Use skylighting 0.7.2. Adjust tests.
This should fix commercialhaskell/stackage#3719, once
a new release is made.
2018-06-09 13:34:21 -07:00
Mauro Bieg
905dee6ee3 beamer output: fix single digit column percentage (#4691)
fixes #4690
2018-06-07 10:50:14 -07:00
John MacFarlane
d32e866449 LaTeX reader: handle includes without surrounding blanklines.
In addition, `\input` can now be used in an inline context,
e.g. to provide part of a paragraph, as it can in LaTeX.

Closes #4553.
2018-06-01 09:25:10 -07:00
Alexander Krotov
5fbc981fc2 Muse reader: add support for floating images 2018-05-31 23:31:27 +03:00
Alexander Krotov
1f78efff3b Muse reader: add support for images with specified width 2018-05-31 01:07:51 +03:00
John MacFarlane
7119715a6a LaTeX reader rawLaTeXBlock: handle macros that resolve to a...
...`\begin` or `\end`.
Fixes #4667.
2018-05-30 12:49:01 -07:00
John MacFarlane
252ab9b773 Markdown writer: preserve implicit_figures with attributes...
...even if `implicit_attributes` is not set, by rendering in
raw HTML.

Fixes #4677.
2018-05-30 09:24:52 -07:00
Alexander Krotov
1100bfc0e6 Muse reader: parse image URLs without "guard" and "takeExtension" 2018-05-30 02:29:43 +03:00
Alexander Krotov
6907985e82 Muse reader: test image with space in filename 2018-05-27 22:22:04 +03:00
Yan Pas
1ce067fc2a tests, parsing fixes 2018-05-23 00:20:30 +03:00
John MacFarlane
58447bba98 rawLaTeXBlock: don't expand macros in macro definitions!
Closes #4653.  Note that this only affected LaTeX in markdown.
Added regression test.
2018-05-15 09:19:13 -07:00
John MacFarlane
2b89aaf04d Make internal links work in ODT/OpenDocument.
This adds proper bookmarks to the headers with non-null IDs.
Closes #4358.
2018-05-14 10:37:46 -07:00
Yan Pas
b0b41cbbe6 Merge branch 'master' into groff_reader 2018-05-12 11:42:39 +03:00
John MacFarlane
a00ca6f0d8 Removed inadvertently added .orig files from repository.
These were added by
96d10c72cc

Closes #4648.
2018-05-11 17:10:32 -07:00
John MacFarlane
c3d2572c5f Use texmath-0.11. 2018-05-10 12:10:35 -07:00
Yan Pas
ad19166bc3 fix build and tests 2018-05-09 20:40:37 +03:00
John MacFarlane
d3be567a73 Fix regression with tex math environments in HTML + MathJax.
Closes #4639.
2018-05-09 10:37:04 -07:00
John MacFarlane
81881ce470 Parsing: Lookahead for non-whitespace after single/double quote start.
Closes #4637.
2018-05-09 10:00:34 -07:00
Yan Pashkovsky
a337685fe0
Merge branch 'master' into groff_reader 2018-05-09 19:48:34 +03:00
John MacFarlane
5f33d2e0cd Another try at test-pandoc-utils.lua on windows. 2018-05-08 22:32:44 -07:00
John MacFarlane
691f38f3d6 test-pandoc-utils.lua - add diagnostic for windows test. 2018-05-08 22:08:23 -07:00
Yan Pas
c1617565fc basic manfile parsing 2018-05-09 03:24:45 +03:00
John MacFarlane
9f2af30c06 More adjustments to test-pandoc-utils.lua.
We need to find something that will work on windows.
2018-05-08 12:28:12 -07:00
John MacFarlane
fa4f3c5c17 test-pandoc-utils.lua - use tr instead of sed.
It should be installed on all *nix systems.
2018-05-08 11:51:50 -07:00
John MacFarlane
83fb9d5495 test-pandoc-utils.lua: workaround some local differences in 'echo'. 2018-05-08 11:22:10 -07:00
John MacFarlane
e6d85927ea test-pandoc-utils.lua: remove problems with missing /bin/false.
Previously it was assumed that the system would have `/bin/false`
and `/bin/sed`, and these tests were skipped otherwise.

On MacOS, these utilities are located in `/usr/bin`.

Fixed by just using `sed` and `false` -- these should always be
in the path.  Removed the "skipping" behavior, replaced with a
check for Windows.  On Windowns, we use `echo` and `cd`, which
should always exist.

Not yet checked on Windows.
2018-05-08 11:07:57 -07:00
John MacFarlane
40603dd4cd Support underline in docx writer.
Updated golden test and confirmed validity of file.

Closes #4633.
2018-05-08 10:17:51 -07:00
John MacFarlane
44f1c72b28 Add test for #4576.
Closes #4576.
2018-05-08 09:14:58 -07:00
Alexander Krotov
5879923422 Muse writer: add support for left-align and right-align classes
Address issue #4542
2018-05-07 14:54:20 +03:00
John MacFarlane
516025248e Update tests for #4605. 2018-05-01 21:26:08 -07:00
Alexander Krotov
4139e3e92b Test Lua filter converting display math to inline math 2018-04-29 16:20:38 +03:00
Francesco Occhipinti
8b01f03eaa RST writer: preserve empty inline parents in flatten (#4603) 2018-04-27 09:01:20 -07:00
Alexander
1927bc9aac Add FB2 reader (#4539) 2018-04-26 12:33:18 -07:00
John MacFarlane
619aaf29aa Merge branch 'fb2-hrblankline' of https://github.com/labdsf/pandoc into labdsf-fb2-hrblankline 2018-04-26 12:29:06 -07:00
John MacFarlane
a96c762a10 RST reader: fix anonymous redirects with backticks.
Closes #4598.
2018-04-26 12:23:25 -07:00