Commit graph

15 commits

Author SHA1 Message Date
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
despresc
90e436d496 Switch to new pandoc-types and use Text instead of String [API change].
PR #5884.

+ Use pandoc-types 1.20 and texmath 0.12.
+ Text is now used instead of String, with a few exceptions.
+ In the MediaBag module, some of the types using Strings
  were switched to use FilePath instead (not Text).
+ In the Parsing module, new parsers `manyChar`, `many1Char`,
  `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`,
  `mantyUntilChar` have been added: these are like their
  unsuffixed counterparts but pack some or all of their output.
+ `glob` in Text.Pandoc.Class still takes String since it seems
  to be intended as an interface to Glob, which uses strings.
  It seems to be used only once in the package, in the EPUB writer,
  so that is not hard to change.
2019-11-12 16:03:45 -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
John MacFarlane
8673eb079b Removed superfluous sourceCode class on code blocks.
* These were added by the RST reader and, for literate Haskell,
  by the Markdown and LaTeX readers.  There is no point to
  this class, and it is not applied consistently by all readers.
  See #5047.

* Reverse order of `literate` and `haskell` classes on code blocks
  when parsing literate Haskell. Better if `haskell` comes first.
2019-01-08 11:36:33 -08: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
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
Alexander Krotov
3443df6068 Markdown reader: add regression test for previous commit 2018-04-17 11:55:37 +03:00
John MacFarlane
7e389cb3db Use NoImplicitPrelude and explicitly import Prelude.
This seems to be necessary if we are to use our custom Prelude
with ghci.

Closes #4464.
2018-03-18 10:46:28 -07:00
John MacFarlane
d9584d73f9 Markdown reader: Improved inlinesInBalancedBrackets.
The change both improves performance and fixes a
regression whereby normal citations inside inline notes
were not parsed correctly.

Closes jgm/pandoc-citeproc#315.
2018-01-14 12:24:21 -08:00
John MacFarlane
e5abee82f2 Shorten unbalanced brackets test.
It was taking a lot of time.
2018-01-14 12:24:21 -08: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
John MacFarlane
6ecc5b96a9 Use tasty for tests rather than test-framework. 2017-03-14 17:07:23 +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
18ab864269 Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
Renamed from tests/Tests/Readers/Markdown.hs (Browse further)