aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2018-10-25Lua: allow access to pandoc state (#5015)Albert Krewinkel2-0/+25
* 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-25Muse writer: add support for grid tablesAlexander Krotov1-11/+24
2018-10-24GroffChar: added @ to list of standard escapes.John MacFarlane1-1/+1
Because we use it as a delimiter for tables (in man) and for math (in ms).
2018-10-24Vimwiki reader: test empty preformatted textAlexander Krotov2-1/+8
2018-10-23Groff writer character escaping changes.John MacFarlane4-31/+31
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-22Man reader: Handle optional argument in ME, UE macros.John MacFarlane2-5/+5
Closes #4995.
2018-10-22Groff writers escaping changes.John MacFarlane2-32/+32
- 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-22LaTeX reader: add support for `nolinkurl` command. (#4992)Brian Leung1-0/+10
2018-10-23Muse writer: do not insert newline before listsAlexander Krotov1-0/+1
2018-10-22Man reader: don't parse \[ul] as unicode escape.John MacFarlane1-1/+1
2018-10-21Man reader: fix code block tests.John MacFarlane1-3/+3
They incorporated a spurious newline which needs to be removed.
2018-10-21Man reader: support .ds, .ds1; also fix macro arguments.John MacFarlane2-2/+4
Closes #4997.
2018-10-22Muse reader: allow footnotes to start with empty lineAlexander Krotov1-0/+17
A space character was required after footnote marker, now newline is allowed.
2018-10-21Man reader: Moved handling of B, I, BI, IB, etc. to parsing phase.John MacFarlane1-1/+1
Ultimately groff lexing should not handle man-specific macros. This approach also gives more correct results for the test case.
2018-10-21Man reader: move macro resolution to lexer phase.John MacFarlane2-1/+15
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-21Muse writer: use lightweight markup after </em> tagAlexander Krotov1-0/+3
2018-10-20Man reader: support UR/UE, MT/ME for links.John MacFarlane2-1/+14
Closes #4989.
2018-10-20Man reader: Fixed handling of nested fonts.John MacFarlane1-0/+7
Closes #4978.
2018-10-21Muse reader: allow empty headersAlexander Krotov1-0/+7
Previously empty headers caused parser to terminate without parsing the rest of the document.
2018-10-20Man reader: Fix .B, .I, .BR, etc.John MacFarlane1-1/+4
2018-10-20Man reader: major restructuring, support macros.John MacFarlane2-5/+5
- 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-20Man reader: block quotes (using RS..RE).John MacFarlane2-2/+4
2018-10-20Man reader: parse TP as definition lists.John MacFarlane2-1/+19
Closes #4981.
2018-10-20Man reader: handle shift in list style.John MacFarlane1-6/+10
Closes #4987.
2018-10-20Powerpoint tests: test raw openxmlJesse Rosenthal4-1/+7
Output files confirmed not to be corrupt, and with content as expected, on PowerPoint 2013 on Windows 10 (virtualbox on linux).
2018-10-19Man reader: improve treatment of .TH.John MacFarlane1-3/+2
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-19Man reader: Improved header parsing.John MacFarlane2-14/+14
- .SH should be level 1, .SS level 2. - The header title can come on the next line.
2018-10-19Man writer: avoid unnecessary `.RS`/`.RE` pair in defn lists.John MacFarlane1-38/+0
When the definition is just one paragraph, we don't need the `.RS\n.RE`.
2018-10-19Man reader: properly handle multi-block list items.John MacFarlane2-31/+31
Closes #4985.
2018-10-19Man reader: Added more tests for escapes.John MacFarlane1-6/+11
Closes #4983.
2018-10-19Man reader: minor improvements.John MacFarlane2-7/+13
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-19More man reader test updates.John MacFarlane1-6/+6
2018-10-19Update tests for last change to man reader.John MacFarlane1-42/+42
2018-10-18Update man reader tests.John MacFarlane3-32/+30
2018-10-18GroffChar: fixed interpretation of `\-`.John MacFarlane2-19/+19
It is the ascii - sign, not the unicode hyphen.
2018-10-18Merge branch 'Yanpas-groff_reader'John MacFarlane6-0/+394
2018-10-18Groff escaping changes.John MacFarlane5-44/+44
- `--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-17man/ms writers: use `\[at]` for escaped `@`.John MacFarlane1-1/+1
2018-10-17Move common groff functions to Text.Pandoc.Writers.GroffJohn MacFarlane6-64/+65
(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-17Man writer: use \f[R] instead of \f[] to reset fontAlexander Krotov2-44/+45
Fixes #4973
2018-10-17Muse reader: allow examples to be indented with tabsAlexander Krotov1-0/+8
2018-10-17Muse reader: remove indentation from examples indicated by {{{ and }}}Alexander Krotov1-0/+6
2018-10-16Merge branch 'groff_reader' of https://github.com/Yanpas/pandoc into ↵John MacFarlane6-0/+394
Yanpas-groff_reader
2018-10-17added old-style testYan Pas4-1/+288
2018-10-15Only override --quickcheck-tests=N if N is not default value (100).John MacFarlane2-2/+12
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-16buildersYan Pas1-4/+4
2018-10-15LaTeX reader: make macroDef polymorphic and allow in inline context.John MacFarlane1-2/+1
Otherwise we can't parse something like ``` \lowercase{\def\x{Foo}} ``` I have actually seen tex like this in the wild.
2018-10-15Added failing test case for macros.John MacFarlane1-0/+18
2018-10-14Markdown writer: ensure blank between raw block and normal content.John MacFarlane2-0/+8
Otherwise a raw block can prevent a paragraph from being recognized as such. Closes #4629.
2018-10-14Markdown reader: Fix awkward soft break movements before abbreviations.John MacFarlane2-1/+32
Closes #4635.