Commit graph

264 commits

Author SHA1 Message Date
John MacFarlane
6a1476e7e2 Export all of Text.Pandoc.Class from Text.Pandoc. 2017-10-29 15:00:49 -07:00
Sascha Wilde
e8be4b0b6d Creole reader (#4002)
* Basic skeleton for creole reader.

No real functionality besides preliminary bold and italics yet.

* Creole: add support for bold/italic with implicit end at paragraph end.

* Creole: add support for headings.

* Creole: add support for tilde escaped chars.

* Basic skeleton for creole reader.

No real functionality besides preliminary bold and italics yet.

* Creole: add support for bold/italic with implicit end at paragraph end.

* Creole: add support for headings.

* Creole: add support for tilde escaped chars.

* Add a test suite for the creole parser

So far this covers only things the parser already supports.

* Added simple parsing of flat unordered lists.

* Added tests for unordered lists in creole.

* First, wrong(!) implementation of sublists.

Fails test, as sublists should not be embedded in a list item!

* Implementation of unordered sublists.

* Added support for ordered lists to creole reader.

* Added utility function to append parsers to Creole reader.

* Creole reader: Fixed list item end detection in sub lists.

* Tests for creole reader: added more tests for lists.

Covering ordered and unordered tests, even mixed.  Tests for
formatting in list items still missing...

* Added "nowiki" blocks.  One exception rule is missing...

* Creole reader: nowiki: implemented exception for curly brackets.

* Creole reader: added inline nowiki.

* Creole reader: added horizontalRule.

* Creole reader: added auto linking of URIs.

* Creole reader: detect horizontalRule as para end.

Used the opportunity for a little refactoring.

* Creole reader: added forced line breaks.

Including test.

* Creole reader: implement wiki links.

* Creole reader: added image support.

* Creole reader: support images as links.

* Creole reader: implemented placeholder -- by simply dropping them.

* Creole reader: added tests for links.

After observing a regression, it was really time...  ;-)

* Creole reader: fixed links with names.

* Creole reader: allow space after first of enclosing tags.

Space after the start of formatting tags are allowed with creole,
e.g. "there is // italic text // in here" is legal.

This problem was discovered using the creole1.0test.txt document from
http://www.wikicreole.org/wiki/Creole1.0TestCases

See l.57:
# // italic item 3 //

* Creole reader: fixed links without names.

* Creole reader: Tests, sorted into groups.

* Creole reader: implemented tables.

* Removed redundant import.

* Creole reader: add correct escaping of links.

* Creole reader: allow handling of e.g. links in parenthesis and quotes.

* Creole reader: Modified disclaimer as most of the code is actually by me.

* Creole reader: Tests: added escaped links.

* Creole reader: preserve leading and trailing space in bold/italic.

* Creole reader: detect tables without a leading blank line.

* Creole Reader: added official creole1.0test.txt as "old" test.

The base document was downloaded from
http://www.wikicreole.org/wiki/Creole1.0TestCases.
The Wiki, and therefore the test document is

Copyright (C) by the contributors.
Some rights reserved, license CC BY-SA.

http://creativecommons.org/licenses/by-sa/1.0/
2017-10-29 13:28:50 -04:00
Alexander Krotov
d99776ea04 Add new style FB2 tests 2017-10-28 21:08:48 +03:00
John MacFarlane
ff16db1aa3 Automatic reformating by stylish-haskell. 2017-10-27 20:28:29 -07:00
John MacFarlane
a2a14f9029 Removed old adjacent_links test for docx reader.
See #2270 for background -- this test blocked the consistent
underline change and was hard to revise, so for now we are
removing it.
2017-10-27 16:09:44 -07:00
hftf
7f8a3c6cb7 Consistent underline for Readers (#2270)
* Added underlineSpan builder function.  This can be easily updated if needed. The purpose is for Readers to transform underlines consistently.

* Docx Reader: Use underlineSpan and update test

* Org Reader: Use underlineSpan and add test

* Textile Reader: Use underlineSpan and add test case

* Txt2Tags Reader: Use underlineSpan and update test

* HTML Reader: Use underlineSpan and add test case
2017-10-27 18:45:00 -04:00
Sascha Wilde
66fd3247ea Creole reader (#3994)
This is feature complete but not very thoroughly tested yet.
2017-10-26 19:19:28 -04:00
Ben Firshman
9046dbadb1
Latex reader: Skip spaces in image options 2017-10-17 16:42:11 +03:00
Ben Firshman
d73fdbf895
Add tests for existing \includegraphics behaviour 2017-10-17 15:09:55 +03: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
bucklereed
c359bdd9b1 LaTeX reader: read polyglossia/babel \text($LANG){...}. 2017-10-06 12:17:50 +01: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
f3a80034ff Removed writerSourceURL, add source URL to common state.
Removed `writerSourceURL` from `WriterOptions` (API change).
Added `stSourceURL` to `CommonState`.
It is set automatically by `setInputFiles`.

Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`.

The type of `getInputFiles` has changed; it now returns `[FilePath]`
instead of `Maybe [FilePath]`.

Functions in Class that formerly took the source URL as a parameter
now have one fewer parameter (`fetchItem`, `downloadOrRead`,
`setMediaResource`, `fillMediaBag`).

Removed `WriterOptions` parameter from `makeSelfContained` in
`SelfContained`.
2017-09-30 16:11:20 -05:00
Albert Krewinkel
2f47e04206
Text.Pandoc.Lua: add mediabag submodule 2017-09-30 09:57:03 +02:00
Alexander Krotov
b5d064e8f0 Muse reader: parse anchors 2017-09-28 14:57:24 +03:00
Alexander Krotov
2cdb8fe2e6 Muse reader: test metadata parsing 2017-09-26 19:31:10 +03:00
Albert Krewinkel
3a7663281a
Org reader: update emphasis border chars
The org reader was updated to match current org-mode behavior: the set
of characters which are acceptable to occur as the first or last
character in an org emphasis have been changed and now allows all
non-whitespace chars at the inner border of emphasized text (see
`org-emphasis-regexp-components`).

Fixes: #3933
2017-09-25 09:31:29 +02:00
John MacFarlane
ddecd72783 Merge pull request #3911 from labdsf/muse-reader-braces
Muse reader: parse {{{ }}} example syntax
2017-09-11 14:01:05 -07:00
Alexander Krotov
8e4ee66563 Muse reader: allow inline markup to be followed by punctuation
Previously code was not allowed to be followed by comma,
and emphasis was allowed to be followed by letter.
2017-09-11 18:34:32 +03:00
Alexander Krotov
508c3a64d8 Muse reader: parse {{{ }}} example syntax 2017-09-11 18:17:28 +03:00
Alexander Krotov
27cccfac84 Muse reader: parse verbatim tag 2017-09-11 12:13:09 +03:00
Alexander Krotov
afedb41b17 Muse reader: trim newlines from <example>s 2017-09-10 12:42:24 +03:00
Alexander Krotov
2230371304 Muse reader: debug inline code markup 2017-09-09 16:39:06 +03:00
Alexander
743413a5b5 Muse reader: Allow finishing header with EOF (#3897) 2017-09-06 08:48:06 -07:00
Alexander
350c282f20 Muse reader: require at least one space char after * in header (#3895) 2017-09-05 09:41:27 -07:00
Alexander
c09b586147 Muse reader: parse <div> tag (#3888) 2017-09-04 21:22:40 -07:00
Alexander
14f813c3f2 Muse reader: parse verse markup (#3882) 2017-08-29 12:40:34 -07:00
Alexander
05bb8ef4aa RST reader: handle blank lines correctly in line blocks (#3881)
Previously pandoc would sometimes combine two line blocks separated by blanks, and ignore trailing blank lines within the line block.

Test is checked to be consisted with http://rst.ninjs.org/
2017-08-28 07:48:46 -07:00
Alexander
e6f767b581 Muse reader: parse <verse> tag (#3872) 2017-08-25 07:09:28 -07:00
bucklereed
c80e26f888 LaTeX reader: RN and Rn, from biblatex (#3854) 2017-08-24 09:45:58 -07:00
Alexander
5d74932578 Muse reader: avoid crashes on multiparagraph inline tags (#3866)
Test checks that behavior is consistent with Amusewiki
2017-08-22 23:12:34 -07:00
Alexander
c7d4fd8cf1 Muse reader: do not allow closing tags with EOF (#3863)
This behavior is compatible to Amusewiki
2017-08-22 16:34:18 -07:00
Albert Krewinkel
41baaff327
Text.Pandoc.Lua: support Inline and Block catch-alls
Try function `Inline`/`Block` if no other filter function of the
respective type matches an element.

Closes: #3859
2017-08-22 23:30:48 +02:00
Albert Krewinkel
56fb854ad8
Text.Pandoc.Lua: respect metatable when getting filters
This change makes it possible to define a catch-all function using lua's
metatable lookup functionality.

    function catch_all(el)
      …
    end

    return {
      setmetatable({}, {__index = function(_) return catch_all end})
    }

A further effect of this change is that the map with filter functions
now only contains functions corresponding to AST element constructors.
2017-08-22 22:56:51 +02:00
Alexander
0a839cbdc9 Muse reader: add definition list support (#3860) 2017-08-21 21:08:44 -07:00
John MacFarlane
d1444b4ecd RST reader/writer: support unknown interpreted text roles...
...by parsing them as Span with "role" attributes.
This way they can be manipulated in the AST.

Closes #3407.
2017-08-17 16:01:44 -07:00
John MacFarlane
38578ad06c Test fixes so we can find data files.
In old tests & command tests, we now set the environment variable
pandoc_datadir.

In lua tests, we set the datadir explicitly.
2017-08-14 13:03:26 -07:00
John MacFarlane
c7cbd3ddc2 Fixed command tests to set local path.
Previously we just tacked on a directory to the command
line, but that didn't work when we e.g. used a pipe for round tripping,
with two invocations of pandoc.
2017-08-13 23:59:38 -07:00
Albert Krewinkel
2dc3dbd68b Use hslua >= 0.7, update Lua code 2017-08-13 14:23:54 +02:00
John MacFarlane
7892dcd353 Command tests; print stderr when a test fails. 2017-08-11 22:09:15 -07:00
John MacFarlane
83d856ee6c Fixed writer tests not to use writerUserDataDir. 2017-08-10 23:51:42 -07:00
John MacFarlane
ac18ff90b2 Org reader: use org-language attribute rather than data-org-language. 2017-08-09 09:45:17 -07:00
John MacFarlane
96933c6043 Org reader: use tag-name attribute instead of data-tag-name. 2017-08-09 09:26:57 -07:00
bucklereed
db55f7c1b2 HTML reader: parse <main> like <div role=main>. (#3791)
* HTML reader: parse <main> like <div role=main>.

* <main> closes <p> and behaves like a block element generally
2017-08-09 09:10:12 -07:00
Alexander
b50de96502 Muse writer: insert two blanklines between lists of the same type (#3844) 2017-08-08 14:05:49 -07:00
Alexander
1b5bfced55 Muse reader: debug indented paragraph support (#3839)
Take only first line indentation into account
and do not start new paragraph on indentation change.
2017-08-06 21:43:59 -07:00
Jesse Rosenthal
a67a96b932 Docx reader: Add tests for avoiding zero-level header. 2017-08-06 19:36:25 -07:00
Alexander
8164a005c0 Muse reader: debug list and list item separation rules (#3837) 2017-08-06 13:19:59 -07:00
bucklereed
685788cd4b LaTeX reader: plainbreak, fancybreak et al from the memoir class (#3833) 2017-08-05 10:03:31 -07:00
Alexander Krotov
7a3a8790de Muse reader: do not allow headers in blockquotes (#3831) 2017-08-03 15:41:45 -07:00
John MacFarlane
7f9e950d8d Class: Removed unnecessary withMedia, improved haddocks. 2017-07-30 07:43:55 -07:00
rlpowell
2ae75e23dd Added TikiWiki reader (#3800)
Added TikiWiki reader, including tests and documentation.

It's probably not *complete*, but it works pretty well, handles all
the basics (and some not-so-basics).
2017-07-21 10:09:54 +02:00
Alexander Krotov
335a1c7f48 Muse reader: fix reading of lists inside tags (#3802) 2017-07-21 10:04:13 +02:00
John MacFarlane
4e8f7a1796 Fix docx writer test for ghc 8.2.1.
Workaround for different behavior of Data.Unique in different ghc
versions.
2017-07-15 11:39:01 +02:00
John MacFarlane
3871a73e0f Rearrange docx writer roundtrip test.
I'm hoping this gives reproducible results on ghc 8.2.1.
2017-07-15 09:14:17 +02:00
John MacFarlane
4e9e1bae7c Refactored compareOutput in docx writer test 2017-07-14 23:39:33 +02:00
Alexander Krotov
de117fbd9e Muse writer: indent lists inside <quote> with at least one space (#3795) 2017-07-12 17:16:02 +02:00
John MacFarlane
0feb7504b1 Rewrote LaTeX reader with proper tokenization.
This rewrite is primarily motivated by the need to
get macros working properly.  A side benefit is that the
reader is significantly faster (27s -> 19s in one
benchmark, and there is a lot of room for further
optimization).

We now tokenize the input text, then parse the token stream.

Macros modify the token stream, so they should now be effective
in any context, including math. Thus, we no longer need the clunky
macro processing capacities of texmath.

A custom state LaTeXState is used instead of ParserState.
This, plus the tokenization, will require some rewriting
of the exported functions rawLaTeXInline, inlineCommand,
rawLaTeXBlock.

* Added Text.Pandoc.Readers.LaTeX.Types (new exported module).
  Exports Macro, Tok, TokType, Line, Column.  [API change]
* Text.Pandoc.Parsing: adjusted type of `insertIncludedFile`
  so it can be used with token parser.
* Removed old texmath macro stuff from Parsing.
  Use Macro from Text.Pandoc.Readers.LaTeX.Types instead.
* Removed texmath macro material from Markdown reader.
* Changed types for Text.Pandoc.Readers.LaTeX's
  rawLaTeXInline and rawLaTeXBlock.  (Both now return a String,
  and they are polymorphic in state.)
* Added orgMacros field to OrgState.  [API change]
* Removed readerApplyMacros from ReaderOptions.
  Now we just check the `latex_macros` reader extension.
* Allow `\newcommand\foo{blah}` without braces.

Fixes #1390.
Fixes #2118.
Fixes #3236.
Fixes #3779.
Fixes #934.
Fixes #982.
2017-07-07 12:36:00 +02:00
John MacFarlane
5e00cf8086 Added parameter for user data directory to runLuaFilter.
in Text.Pandoc.Lua.  Also to pushPandocModule.

This change allows users to override pandoc.lua with a file
in their local data directory, adding custom functions, etc.

@tarleb, if you think this is a bad idea, you can revert this.
But in general our data files are all overridable.
2017-06-29 17:13:19 +02:00
Alexander Krotov
79cc56726c Muse reader: parse indented blockquotes (#3769) 2017-06-28 14:32:53 +02:00
bucklereed
460b6c470b HTML reader: Use the lang value of <html> to set the lang meta value. (#3765)
* HTML reader: Use the lang value of <html> to set the lang meta value.

* Fix for pre-AMP environments.
2017-06-27 10:19:37 +02:00
Alexander Krotov
fa515e46f3 Muse writer: fix hlint errors (#3764) 2017-06-26 15:07:45 +02:00
Alexander Krotov
492b3b1291 Muse reader: fix horizontal rule parsing (#3762)
Do not parse 3 dashes as horizontal rule and allow whitespace after rule
2017-06-26 08:41:17 +02:00
Alexander Krotov
f8877516e0 Muse reader: Require space before and after '=' for code (#3758) 2017-06-25 10:01:43 +02:00
Alexander Krotov
2192528424 Muse reader: check that headers start at the first column (#3749) 2017-06-20 14:48:00 +02:00
Alexander Krotov
4929d027dc Muse reader: fix list item continuation parsing (#3747) 2017-06-19 22:16:21 +02:00
Yuchen Pei
564c77964d Added Vimwiki reader (#3705).
* New module Text.Pandoc.Readers.Vimwiki, exporting readVimwiki [API change].
* New input format `vimwiki`.
* New data file, `data/vimwiki.css`, for displaying the HTML produced by this reader and pandoc's HTML writer in the style of vimwiki's own HTML export.
2017-06-19 22:15:12 +02:00
Alexander Krotov
a91b9b2a1d Add Muse reader (#3620) 2017-06-19 10:46:02 +02:00
John MacFarlane
f5d2d77ed9 Revert "Command tests: small change to try to fix appveyor failures."
This reverts commit 0ab26ac9eb.

Failed experiment.
2017-06-11 21:18:42 +02:00
John MacFarlane
0ab26ac9eb Command tests: small change to try to fix appveyor failures. 2017-06-11 11:52:53 +02:00
John MacFarlane
fa719d0264 Switched Writer types to use Text.
* XML.toEntities: changed type to Text -> Text.
* Shared.tabFilter -- fixed so it strips out CRs as before.
* Modified writers to take Text.
* Updated tests, benchmarks, trypandoc.

[API change]

Closes #3731.
2017-06-11 00:46:31 +02:00
John MacFarlane
94b3dacb4e Changed all readers to take Text instead of String.
Readers: Renamed StringReader -> TextReader.

Updated tests.

API change.
2017-06-10 18:26:44 +02:00
Albert Krewinkel
e1a0666689
Org reader: respect export option for tags
Tags are appended to headlines by default, but will be omitted when the
`tags` export option is set to nil.

Closes: #3713
2017-05-31 21:26:07 +02:00
Albert Krewinkel
33a1e4ae1a
Org reader: include tags in headlines
The Emacs default is to include tags in the headline when exporting.
Instead of just empty spans, which contain the tag name as attribute,
tags are rendered as small caps and wrapped in those spans.
Non-breaking spaces serve as separators for multiple tags.
2017-05-31 20:43:30 +02:00
Herwig Stuetz
bfd5c6b172 Org reader: Fix cite parsing behaviour
Until now, org-ref cite keys included special characters also at the
end. This caused problems when citations occur right before colons or
at the end of a sentence.

With this change, all non alphanumeric characters at the end of a cite
key are ignored.

This also adds `,` to the list of special characters that are legal
in cite keys to better mirror the behaviour of org-export.
2017-05-28 18:08:11 +02:00
Albert Krewinkel
bf93c07267
Org reader: subject full doc tree to headline transformations
Emacs parses org documents into a tree structure, which is then
post-processed during exporting. The reader is changed to do the same,
turning the document into a single tree of headlines starting at
level 0.

Fixes: #3695
2017-05-27 15:38:08 +02:00
John MacFarlane
895866222c Test.Command: put stderr output at front, so it can be tested. 2017-05-25 11:51:50 +02:00
Albert Krewinkel
7a09b7b21d
Org reader: fix smart parsing behavior
Parsing of smart quotes and special characters can either be enabled via
the `smart` language extension or the `'` and `-` export options. Smart
parsing is active if either the extension or export option is enabled.
Only smart parsing of special characters (like ellipses and en and em
dashes) is enabled by default, while smart quotes are disabled.

This means that all smart parsing features will be enabled by adding the
`smart` language extension. Fine-grained control is possible by leaving
the language extension disabled. In that case, smart parsing is
controlled via the aforementioned export OPTIONS only.

Previously, all smart parsing was disabled unless the language extension
was enabled.
2017-05-18 23:25:11 +02:00
Alexander Krotov
c14c8a1a68 Replace repeat' and take' with `replicate' 2017-05-12 07:36:03 +02:00
Alexander Krotov
69110cde81 Muse writer: Indent tables with one space (#3649)
It is required to trigger Muse table rendering.
2017-05-07 21:41:38 +02:00
John MacFarlane
de0fd90051 Use fewer quickcheck tests for lua tests, to speed things up. 2017-05-07 11:45:06 +02:00
Albert Krewinkel
da8c153a68
Org reader: support macros
Closes: #3401
2017-05-06 11:00:32 +02:00
Albert Krewinkel
ae21a8bb2a
Lua filter: fall-back to global filters when none is returned
The implicitly defined global filter (i.e. all element filtering
functions defined in the global lua environment) is used if no filter is
returned from a lua script. This allows to just write top-level
functions in order to define a lua filter. E.g

    function Emph(elem) return pandoc.Strong(elem.content) end
2017-04-30 17:06:54 +02:00
Albert Krewinkel
04cb602d79
Org reader: allow multi-word arguments to src block params
The reader now correctly parses src block parameter list even if
parameter arguments contain multiple words.

Closes: #3477
2017-04-23 13:58:16 +02:00
Albert Krewinkel
2e43e27e5c
Org reader: stop adding rundoc prefix to src params
Source block parameter names are no longer prefixed with *rundoc*. This
was intended to simplify working with the rundoc project, a babel
runner. However, the rundoc project is unmaintained, and adding those
markers is not the reader's job anyway.

The original language that is specified for a source element is now
retained as the `data-org-language` attribute and only added if it
differs from the translated language.
2017-04-23 12:56:11 +02:00
Albert Krewinkel
04658c491b
Org reader: handle line numbering switch for src blocks
The line-numbering switch that can be given to source blocks (`-n` with
an start number as an optional parameter) is parsed and translated to a
class/key-value combination used by highlighting and other readers and
writers.
2017-04-23 11:54:36 +02:00
Albert Krewinkel
464db59394
Org reader: allow emphasized text to be followed by [
Closes: #3577
2017-04-16 21:19:35 +02:00
Albert Krewinkel
56dddcc3f5
Org reader: convert markup at beginning of footnotes
Closes: #3576
2017-04-16 17:22:47 +02:00
Albert Krewinkel
3aeed816e1
Lua filter: allow shorthand functions for math and quoted
Allow to use functions named `SingleQuoted`, `DoubleQuoted`,
`DisplayMath`, and `InlineMath` in filters.
2017-04-14 23:43:59 +02:00
Albert Krewinkel
425df8fff4
Use lua constructors to push meta values 2017-04-13 22:57:50 +02:00
Albert Krewinkel
41ebdee5df
Lua filter: improve doc filter performance
Pandoc elements are pushed and pulled from the lua stack via custom
instances.
2017-04-07 21:04:22 +02:00
Albert Krewinkel
d412c38c71
Ensure correctness of StackValue instances 2017-04-06 21:00:38 +02:00
Albert Krewinkel
e7eb21ecca
Lua module: add readers submodule
Plain text readers are exposed to lua scripts via the `pandoc.reader`
submodule, which is further subdivided by format.  Converting e.g. a
markdown string into a pandoc document is possible from within lua:

    doc = pandoc.reader.markdown.read_doc("Hello, World!")

A `read_block` convenience function is provided for all formats,
although it will still parse the whole string but return only the first
block as the result.

Custom reader options are not supported yet, default options are used
for all parsing operations.
2017-04-02 17:28:07 +02:00
John MacFarlane
831e1c5edd Added JATS writer.
* New module Text.Pandoc.Writer.JATS exporting writeJATS.
* New output format `jats`.
* Added tests.
* Revised manual.
2017-03-30 01:16:34 +02:00
John MacFarlane
6c204ea2bd Initial addition of groff ms writer.
* New module: Text.Pandoc.Writers.Ms.
* New template: default.ms.
* The writer uses texmath's new eqn writer to convert math
  to eqn format, so a ms file produced with this writer
  should be processed with `groff -ms -e` if it contains
  math.
2017-03-23 10:14:16 +01:00
Albert Krewinkel
f2f6851713 Lua filters (#3514)
* Add `--lua-filter` option.  This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed.  Note that lua filters are all applied after regular filters, regardless of their position on the command line.
* Add Text.Pandoc.Lua, exporting `runLuaFilter`.  Add `pandoc.lua` to data files.
* Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module.
* Add Tests.Lua to tests.
* Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters.
* Document in MANUAL.txt.
2017-03-20 15:17:03 +01:00
John MacFarlane
2235c2a8f7 Use tasty-golden for golden tests in Old. 2017-03-15 00:27:39 +01:00
John MacFarlane
93c49a2865 Command tests: just findPandoc once. 2017-03-14 23:39:28 +01:00
John MacFarlane
14edbd2967 Removed unneeded import. 2017-03-14 21:30:15 +01:00
John MacFarlane
6cb54c3def Got rid of distracting warning in test output. 2017-03-14 21:06:14 +01:00
John MacFarlane
ebbaf2e965 Small test plumbing improvement. 2017-03-14 17:27:30 +01:00
John MacFarlane
6ecc5b96a9 Use tasty for tests rather than test-framework. 2017-03-14 17:07:23 +01:00
Alexander Krotov
d037c5019d Add Muse writer (#3489)
* Add Muse writer

* Advertise new Muse writer

* Muse writer: add regressions tests
2017-03-10 10:16:27 +01:00
John MacFarlane
93a9c09b6b Speed up Native writer quickcheck tests. 2017-03-07 15:14:36 +01:00
John MacFarlane
69c4602f46 Small change to unbalanced bracket test to speed up test suite. 2017-03-07 15:03:26 +01:00
John MacFarlane
e256c8ce17 Stylish-haskell automatic formatting changes. 2017-03-04 13:03:41 +01:00
John MacFarlane
fe4311d5a1 LaTeX writer: always add hypertarget when there's a non-empty identifier.
Previously the hypertargets were only added when there was actually
a link to that identifier.  Closes #2719.
2017-03-01 21:38:28 +01:00
Alexander Krotov
48f809384a Add Org writer unit tests 2017-02-12 17:09:07 +03:00
John MacFarlane
76c55466d3 Use new warnings throughout the code base. 2017-02-11 00:14:44 +01:00
John MacFarlane
47a16065c4 Removed --parse-raw and readerParseRaw.
These were confusing.

Now we rely on the +raw_tex or +raw_html extension with latex
or html input.

Thus, instead of

    --parse-raw -f latex

we use

    -f latex+raw_tex

and instead of

     --parse-raw -f html

we use

    -f html+raw_html
2017-02-06 23:33:23 +01:00
John MacFarlane
a435422d0f Consolidated some common functions in Tests.Helper. 2017-02-04 21:56:32 +01:00
John MacFarlane
49c7cf40fe Added new test framework Tests.Command.
Any files added under test/command will be treated as
shell tests (see smart.md for an example).

This makes it very easy to add regression tests etc.
2017-02-04 21:07:03 +01:00
John MacFarlane
7ea4ad11bb Added skeleton for Tests.Command. 2017-02-04 17:38:03 +01:00
John MacFarlane
18ab864269 Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00