Commit graph

198 commits

Author SHA1 Message Date
Albert Krewinkel
4f34345867
Update copyright notices for 2021 (#7012) 2021-01-08 09:38:20 -08:00
Albert Krewinkel
11b5f1e40b
Update copyright year (#6186)
* Update copyright year

* Copyright: add notes for Lua and Jira modules
2020-03-13 09:52:47 -07:00
Leif Metcalf
e53c952997 Remove blank line (#5679) 2019-08-08 16:02:14 -07:00
John MacFarlane
f3080c0c22 Remove license boilerplate.
The haddock module header contains essentially the
same information, so the boilerplate is redundant and
just one more thing to get out of sync.
2019-03-01 10:27:06 -08:00
Albert Krewinkel
37a82b0b11 Add missing copyright notices and remove license boilerplate (#5112)
Quite a few modules were missing copyright notices.

This commit adds copyright notices everywhere via haddock module
headers.  The old license boilerplate comment is redundant with this and has
been removed.

Update copyright years to 2019.

Closes #4592.
2019-02-04 13:52:31 -08:00
Albert Krewinkel
0d935bd081
Update copyright notices to include 2018 2018-01-05 20:39:12 +01:00
John MacFarlane
6a1476e7e2 Export all of Text.Pandoc.Class from Text.Pandoc. 2017-10-29 15:00:49 -07:00
John MacFarlane
2363e6a15b Move CR filtering from tabFilter to the readers.
The readers previously assumed that CRs had been filtered
from the input.  Now we strip the CRs in the readers themselves,
before parsing.  (The point of this is just to simplify the
parsers.)

Shared now exports a new function `crFilter`. [API change]
And `tabFilter` no longer filters CRs.
2017-06-20 21:52:13 +02:00
John MacFarlane
4ba5ef46ae Updated code example. 2017-06-20 21:25:39 +02:00
Albert Krewinkel
965f1ddd4a
Update dates in copyright notices
This follows the suggestions given by the FSF for GPL licensed software.
<https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-05-13 23:30:13 +02:00
Albert Krewinkel
c2567b2bd0 API change: move writer functions to Text.Pandoc.Writers
Writer helper functions were defined in the top-level Text.Pandoc
module. These functions are moved to the Writer submodule as to enable
reuse in other submodules.
2017-04-26 23:28:40 +02:00
Albert Krewinkel
0e107a305f API change: move reader functions to Text.Pandoc.Readers
Reader helper functions were defined in the top-level Text.Pandoc
module. These functions are moved to the Readers submodule as to enable
reuse in other submodules.
2017-04-26 23:28:40 +02:00
Albert Krewinkel
3ac23ab615 API change: move extension handling to Text.Pandoc.Extensions
Extension parsing and processing functions were defined in the top-level
Text.Pandoc module.  These functions are moved to the Extensions
submodule as to enable reuse in other submodules.
2017-04-26 23:28:40 +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
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
e256c8ce17 Stylish-haskell automatic formatting changes. 2017-03-04 13:03:41 +01:00
John MacFarlane
5e1249481b Added Text.Pandoc.Logging (exported module).
This now contains the Verbosity definition previously
in Options, as well as a new LogMessage datatype that
will eventually be used instead of raw strings for
warnings.

This will enable us, among other things, to provide
machine-readable warnings if desired.

See #3392.
2017-02-10 20:59:54 +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
cb1b0bcba7 Expose setVerbosity in Text.Pandoc 2017-02-04 21:06:36 +01:00
John MacFarlane
5e2754f515 Make epub an alias for epub3, not epub2. 2017-01-30 10:19:30 +01:00
John MacFarlane
411434bf13 Removed some old commented-out code. 2017-01-28 23:34:29 +01:00
John MacFarlane
d2e0592e01 LaTeX writer: export writeBeamer.
Removed writerBeamer from WriterOptions.
2017-01-28 09:52:45 +01:00
John MacFarlane
91cdcc796d HTML: export separate functions for slide formats.
writeS5, writeSlideous, writeRevealJs, writeDZSlides, writeSlidy.

Removed writerSlideVariant from WriterOptions.
2017-01-27 22:39:36 +01:00
John MacFarlane
b6c1d491f5 Split writeDocbook into writeDocbook4, writeDocbook5.
Removed writerDocbookVersion in WriterOptions.
Renamed default.docbook template to default.docbook4.
Allow docbook4 as an output format.
But alias docbook = docbook4.
2017-01-26 22:40:57 +01:00
John MacFarlane
190943e1fd EPUB writer: split writeEPUB into writeEPUB2, writeEPUB3.
Also include explicit epub2 output format in CLI tool.
2017-01-26 22:09:21 +01:00
John MacFarlane
fce0a60f0a Provide explicit separate functions for HTML 4 and 5.
* Text.Pandoc.Writers.HTML: removed writeHtml, writeHtmlString,
  added writeHtml4, writeHtml4String, writeHtml5, writeHtml5String.
* Removed writerHtml5 from WriterOptions.
* Renamed default.html template to default.html4.
* "html" now aliases to "html5"; to get the old HTML4 behavior,
  you must now specify "-t html4".
2017-01-25 21:51:26 +01:00
John MacFarlane
5bf9125770 Removed readerOldDashes and --old-dashes option, added old_dashes extension.
API change.  CLI option change.
2017-01-25 17:07:42 +01:00
John MacFarlane
6f8b967d98 Removed readerSmart and the --smart option; added Ext_smart extension.
Now you will need to do

    -f markdown+smart

instead of

    -f markdown --smart

This change opens the way for writers, in addition to readers,
to be sensitive to +smart, but this change hasn't yet been made.

API change. Command-line option change.

Updated manual.
2017-01-25 17:07:42 +01:00
John MacFarlane
3876b91448 Make Extensions a custom type instead of a Set Extension.
The type is implemented in terms of an underlying bitset
which should be more efficient.

API change: from Text.Pandoc.Extensions export Extensions,
emptyExtensions, extensionsFromList, enableExtension, disableExtension,
extensionEnabled.
2017-01-25 17:07:42 +01:00
John MacFarlane
a964b14475 Text.Pandoc: limit exports from Text.Pandoc.Class. 2017-01-25 17:07:41 +01:00
John MacFarlane
2e7b0c7eda Added ReaderOptions parameter to readNative.
This makes it similar to the other readers -- even
though ReaderOptions is essentially ignored, the uniformity
is nice.
2017-01-25 17:07:41 +01:00
John MacFarlane
f1ef0e3645 Finished previous commit; removed export of toJsonFilter. 2017-01-25 17:07:41 +01:00
John MacFarlane
f91a6b541f Removed deprecated toJsonFilter.
Use toJSONFilter from Text.Pandoc.JSON.
2017-01-25 17:07:41 +01:00
John MacFarlane
d7583f3659 Error: change type of handleError.
It now lives in IO and gives a proper message + exit
instead of calling 'error'.

We shouldn't be making it easier for people to raise error on
pure code.  And this is better for the main application
in IO.
2017-01-25 17:07:40 +01:00
John MacFarlane
dc1bbaf58d Removed readRSTWithWarnings (now useless). 2017-01-25 17:07:40 +01:00
John MacFarlane
2710fc4261 Class: Renamed 'warn' to 'addWarning' and consolidated RTF writer.
* Renaming Text.Pandoc.Class.warn to addWarning avoids conflict
  with Text.Pandoc.Shared.warn.
* Removed writeRTFWithEmbeddedImages from Text.Pandoc.Writers.RTF.
  This is no longer needed; we automatically handle embedded images
  using the PandocM functions.  [API change]
2017-01-25 17:07:40 +01:00
Jesse Rosenthal
3574b98f81 Unify Errors. 2017-01-25 17:07:40 +01:00
Jesse Rosenthal
3f7b3f5fd0 Add Text2Tags to Text.Pandoc 2017-01-25 17:07:40 +01:00
Jesse Rosenthal
b53ebcdf8e Working on readers. 2017-01-25 17:07:40 +01:00
John MacFarlane
18e85f8dfb Changed readNative to use PandocMonad. 2017-01-25 17:07:40 +01:00
John MacFarlane
bf8fb78389 Text.Pandoc: Change Reader to Reader m.
For now I just replaced occurences of Reader with Reader IO,
so nothing is really different.

When we move readers into instances of PandocMonad, though,
we can change things here so that the readers will work
with any instance of PandocMonad.
2017-01-25 17:07:40 +01:00
John MacFarlane
8978689c08 Removed some commented-out source. 2017-01-25 17:07:40 +01:00
John MacFarlane
300d94ac24 Deleted whitespace at end of source lines. 2017-01-25 17:07:39 +01:00
John MacFarlane
b969863e07 Export Text.Pandoc.Class from Text.Pandoc. 2017-01-25 17:07:39 +01:00
Jesse Rosenthal
04545c92c8 Clean up Text.Pandoc
We had primed versions of all the Writer types and getWriter
functions, as we transitioned. Now that we're using the new ones
exclusively, we'll get rid of the old ones, and get rid of the primes in
the names.
2017-01-25 17:07:39 +01:00
Jesse Rosenthal
04487779b2 Convert all writers to use PandocMonad.
Since PandocMonad is an instance of MonadError, this will allow us, in a
future commit, to change all invocations of `error` to `throwError`,
which will be preferable for the pure versions. At the moment, we're
disabling the lua custom writers (this is temporary).

This requires changing the type of the Writer in Text.Pandoc. Right now,
we run `runIOorExplode` in pandoc.hs, to make the conversion easier. We
can switch it to the safer `runIO` in the future.

Note that this required a change to Text.Pandoc.PDF as well. Since
running an external program is necessarily IO, we can be clearer about
using PandocIO.
2017-01-25 17:07:39 +01:00
Jesse Rosenthal
989971fce1 Pandoc.hs: Run runIOorExplode on IO functions.
This is a compatibility layer to reintroduce something like the old
errors into the functions.
2017-01-25 17:07:39 +01:00
John MacFarlane
f9df62c29f Export Text.Pandoc.getDefaultExtensions.
See #3178.
2016-11-18 17:01:09 +01:00
John MacFarlane
d51e475bad Export Text.Pandoc.Error in Text.Pandoc.
[API change]
2016-10-24 22:31:36 +02:00