John MacFarlane
38b5f24a66
HTML reader: td should close an open th or td.
2017-10-24 14:42:33 -07:00
John MacFarlane
ad2df0655e
Revert "HTML reader: td or th implicitly closes blocks within last td/th."
...
This reverts commit d2c4243f89
.
2017-10-24 14:32:51 -07:00
John MacFarlane
d2c4243f89
HTML reader: td or th implicitly closes blocks within last td/th.
2017-10-24 14:27:49 -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
6d862ff954
Downgraded SkippedContent and DocxParserWarning from WARNING to INFO
2017-10-23 10:54:51 -07:00
mb21
e2123a4033
LaTeX Reader: support \lettrine
2017-10-22 20:33:30 +02:00
mb21
05adbd6f19
LaTeX Reader: use opt function consistently
2017-10-22 20:33:30 +02:00
John MacFarlane
4aa84f4006
In rendering PandocParsecError, only print input at error location...
...
if the source name is `source` (i.e., the top level). Otherwise
results will be misleading, since what readM does is to look
up the source position of the error in the *original* input,
which may not match the input used by parseFromString or
in parsing from an included file.
Closes #3865 . Not a great fix, maybe there's something better
that could be done, but this should at least avoid misleading
messages.
2017-10-21 21:54:38 -07:00
John MacFarlane
5164ecd0ec
SelfContained: data-background-image instead of data-background.
...
Really closes #3979 .
2017-10-20 23:16:53 -07:00
John MacFarlane
21328a8771
LaTeX reader: be more forgiving in parsing command options.
...
This was needed, for example, to make some minted options work.
2017-10-19 15:58:29 -07:00
John MacFarlane
f615d7bb98
LaTeX reader: Strip off quotes in \include
filenames.
2017-10-19 15:36:18 -07:00
John MacFarlane
28bb5d610d
LaTeX reader: support \expandafter
.
...
Closes #3983 .
2017-10-19 13:23:50 -07:00
John MacFarlane
e941ba05b9
LaTeX reader: handle \DeclareRobustCommand
.
...
Currently it's just treated as a synonym for `\newcommand`.
Handles the second case mentioned in #3983 .
2017-10-19 11:50:16 -07:00
Ben Firshman
9046dbadb1
Latex reader: Skip spaces in image options
2017-10-17 16:42:11 +03:00
John MacFarlane
c2de9d749c
SelfContained: handle data-background attribute on section.
...
This should help with #3979 .
In my test, I got a data uri for data-background. But it didn't
actually work in the browser (the background image didn't show).
Not sure whether this is a problem in reveal.js or a problem
in pandoc...
2017-10-16 23:10:05 -07:00
John MacFarlane
514958f5ea
HTML writer: don't add data- prefix to unknown attributes beginning with data-.
...
Or we'll get data-data-blah.
2017-10-16 23:06:13 -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
d8804f4747
App: added --request-header option.
2017-10-15 22:13:15 -07:00
John MacFarlane
2f66d57616
Remove openURL from Shared (API change).
...
Now all the guts of openURL have been put into openURL from
Class. openURL is now sensitive to stRequestHeaders in CommonState
and will add these custom headers when making a request.
It no longer looks at the USER_AGENT environment variable,
since you can now set the `User-Agent` header directly.
2017-10-15 22:11:38 -07:00
John MacFarlane
a1f7a4263f
Class: add stRequestHeaders to CommonState, and setRequestHeader.
2017-10-15 22:09:28 -07:00
John MacFarlane
5e1c422389
Handle unknown options in form --latex-engine=foo
.
...
Previously these were not triggering the helpful message
about option name changes.
2017-10-15 18:27:48 -07:00
John MacFarlane
eb508c1330
Merge pull request #3970 from d-dorazio/master
...
markdown writer: always write bracketed_spans' attributes
2017-10-13 14:02:01 -04:00
John MacFarlane
6934b921b3
CommonMark writer: omit "fig:" prefix in image titles.
...
This is used internally to indicate internal figures.
See https://groups.google.com/d/msgid/pandoc-discuss/892c5a25-086a-4e19-b4c1-8
975cea8df0f@googlegroups.com ?utm_medium=email&utm_source=footer
2017-10-13 10:36:27 -07:00
d-dorazio
8dd8f492c1
markdown writer: always write bracketed_spans' attributes
2017-10-13 12:00:28 +02:00
John MacFarlane
75d8c99c73
ConTeXt writer: Use identifiers for chapters.
...
Closes #3968 .
2017-10-11 20:21:55 -07:00
Alexander Krotov
00013c21eb
FB2 Writer: format LineBlock as poem
...
Previously writer produced one paragraph with <empty-line/> elements,
which are not allowed inside <p> according to FB2 schema.
2017-10-11 12:34:02 +03:00
Agustín Martín Barbero
cdb9efa823
docx writer - activate evenAndOddHeaders from reference doc
...
Fixes #3901 by checking for the evenAndOddHeaders mark in the
reference doc, and copying it to the resulting docx if present.
2017-10-10 00:58:25 +02:00
Alexander Krotov
4bfcbbfc30
FB2 writer: replace concatMap with cMap
2017-10-09 19:04:10 +03:00
Alexander Krotov
81d28412d0
hlint FB2 writer
2017-10-09 18:08:27 +03:00
John MacFarlane
7d2ff7ed6d
Shared.stringify, removeFormatting: handle Quoted better.
...
Previously we were losing the qutation marks in Quoted
elements. See #3958 .
2017-10-08 21:55:57 -07:00
John MacFarlane
ad13189c8f
LaTeX reader: don't treat "..." as Quoted.
...
This caused quotes to be omitted in `\texttt` contexts.
Closes #3958 .
However, a better fix would be to modify the
2017-10-08 21:11:58 -07:00
John MacFarlane
fdaae5aec5
Small logic fix.
2017-10-08 09:53:03 -07:00
Albert Krewinkel
f176ad6f21
Org reader: end footnotes after two blank lines
...
Footnotes can not only be terminated by the start of a new footnote or a
header, but also by two consecutive blank lines.
2017-10-08 14:17:26 +02:00
John MacFarlane
89f1362660
Use mathjax 2.7.2 by default.
2017-10-06 21:12:54 -07:00
John MacFarlane
c0b3f7fc60
Removed redundant import
2017-10-06 20:29:11 -07:00
bucklereed
c359bdd9b1
LaTeX reader: read polyglossia/babel \text($LANG){...}.
2017-10-06 12:17:50 +01:00
John MacFarlane
23eaf2a74f
KaTeX fixes:
...
* In Options.HTMLMathMethod, the KaTeX contsructor now takes only
one string (for the KaTeX base URL), rather than two [API change].
* The default URL has been updated to the latest version.
* The autoload script is now loaded by default.
2017-10-05 10:08:04 -07:00
Albert Krewinkel
12f8efe012
pandoc.lua: throw better error when pipe command fails
...
A table containing the error code, command, and command output is thrown
instead of just a string error message.
2017-10-05 11:41:59 +02:00
Albert Krewinkel
2262f005ce
Use hslua v0.9.0
2017-10-05 11:30:44 +02:00
Albert Krewinkel
371f9b7084
pandoc.lua: use wrapper funciton for pipe command
...
The pipe command is wrapped in a lua function, throwing a lua error if
the command returns with an error. A wrapper is needed as Haskell
functions exposed to lua may not throw lua errors due to limitations of
hslua.
The error handling is written such that a table can be returned as an
error object in the future. This is potentially useful when finer
control is required while catching the error in lua code. Current
limitations of hslua require error objects to be strings.
2017-10-03 20:45:11 +02:00
Albert Krewinkel
9b750f7d87
Lua.PandocModule: promote addFunction to top level
...
This reduces some boilerplate.
2017-10-03 13:13:45 +02:00
John MacFarlane
492f496842
Markdown reader: Fixed bug with indented code following raw LaTeX.
...
Closes #3947 .
2017-10-02 21:28:14 -07:00
Albert Krewinkel
514662e544
Org reader: support \n
export option
...
The `\n` export option turns all newlines in the text into hard
linebreaks.
Closes #3950
2017-10-02 23:11:58 +02:00
John MacFarlane
3e77ea4792
Lua: added 'pipe', which encapsulates Text.Pandoc.Process.pipeProcess.
...
This is hard to do in lua, so it's helpful to provide this.
2017-10-01 15:23:20 -07:00