Commit Graph

156 Commits

Author SHA1 Message Date
Christian Despres cae155b095 Fix hlint suggestions, update hlint.yaml (#6680)
* Fix hlint suggestions, update hlint.yaml

Most suggestions were redundant brackets. Some required
LambdaCase.

The .hlint.yaml file had a small typo, and didn't ignore camelCase
suggestions in certain modules.
2020-09-13 07:48:14 -07:00
Vaibhav Sagar 9c2b659eeb Support new Underline element in readers and writers (#6277)
Deprecate `underlineSpan` in Shared in favor of `Text.Pandoc.Builder.underline`.
2020-04-28 07:53:06 -07:00
despresc c7814f31e1 Use the new builders, modify readers to preserve empty headers
The Builder.simpleTable now only adds a row to the TableHead when the
given header row is not null. This uncovered an inconsistency in the
readers: some would unconditionally emit a header filled with empty
cells, even if the header was not present. Now every reader has the
conditional behaviour. Only the XWiki writer depended on the header
row being always present; it now pads its head as necessary.
2020-04-15 23:03:22 -04:00
despresc 4e34d366df Adapt to the newest Table type, fix some previous adaptation issues
- Writers.Native is now adapted to the new Table type.

- Inline captions should now be conditionally wrapped in a Plain, not
  a Para block.

- The toLegacyTable function now lives in Writers.Shared.
2020-04-15 23:03:22 -04:00
despresc 7254a2ae0b Implement the new Table type 2020-04-15 23:03:22 -04: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
Alexander Krotov a1977dd2d6 Muse reader: do not allow closing asterisks to be followed by "*" 2019-10-15 16:36:05 +03:00
Alexander Krotov d5c13dd438 Muse reader: do not split series of asterisks into symbols and emphasis
Fixes #5821
2019-10-15 01:55:32 +03:00
Alexander Krotov 13e0ac1104 Muse reader: do not terminate emphasis on "*" not followed by space 2019-10-15 01:02:54 +03:00
Alexander Krotov 6a9cafc67a hlint Muse reader tests 2019-10-04 18:28:53 +03:00
Alexander Krotov 0713cb65bc Muse: add RTL support
Closes #5551
2019-07-14 18:22:52 +03:00
Alexander Krotov 814c3af4df Muse reader: test that links inside image descriptions work 2019-06-09 14:08:37 +03:00
Alexander Krotov f807f5b383 Muse reader: allow images inside link descriptions 2019-05-25 19:17:16 +03:00
Alexander Krotov c4814ea965 Muse reader: add secondary note support 2019-02-18 15:21:32 +03:00
Alexander Krotov 59fa4eb17e Muse reader: test that block level markup does not break <verbatim> 2019-02-06 02:25:24 +03: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
Alexander Krotov 5101f4324b Muse reader tests: test #cover directive 2018-12-25 15:23:02 +03:00
Alexander Krotov 367e8cac18 Muse reader: trim whitespace before parsing grid table cells 2018-11-14 19:17:05 +03:00
Alexander Krotov c61b67410a Muse reader: add grid tables support 2018-11-14 17:58:44 +03:00
Alexander Krotov f8ca36525d Muse: Make tables round-trip 2018-10-28 03:52:35 +03:00
Alexander Krotov e34a0703f5 Muse reader: try to parse lists before trying to parse table
This ensures that tables inside lists are parsed correctly.
2018-10-28 03:52:25 +03:00
Alexander Krotov d8135b2e67 Remove misleading comment from Muse reader tests
pandoc follows Text::Amuse rules instead of being bug compatible with Emacs Muse
2018-10-27 23:43:23 +03:00
Alexander Krotov d28dca57db Muse reader: forbid whitespace after opening and before closing markup elements
See https://github.com/melmothx/text-amuse/issues/44 for discussion on these rules
2018-10-27 23:35:11 +03:00
Alexander Krotov 1ca320e249 Muse reader: parse page breaks 2018-10-26 16:30:15 +03:00
Alexander Krotov 875e33ecf6 Muse reader: allow footnotes to start with empty line
A space character was required after footnote marker, now newline is allowed.
2018-10-22 03:05:17 +03:00
Alexander Krotov 8df59952bf Muse reader: allow empty headers
Previously empty headers caused parser to terminate without parsing the rest of the document.
2018-10-21 06:42:00 +03:00
Alexander Krotov 6fc812485e Muse reader: allow examples to be indented with tabs 2018-10-17 18:17:30 +03:00
Alexander Krotov 1071732719 Muse reader: remove indentation from examples indicated by {{{ and }}} 2018-10-17 13:57:05 +03:00
John MacFarlane 885cbfd420 Only override --quickcheck-tests=N if N is not default value (100).
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-15 22:15:43 -07:00
Alexander Krotov 6b8fd99dbd Test that Muse reader can parse code with = sign inside
(fixed by previous commit)
2018-10-10 03:27:36 +03:00
Alexander Krotov d3b2161bd1 Muse reader: fix parsing of empty cells 2018-10-10 01:48:58 +03:00
Alexander Krotov 5f7799ac8f Muse reader: allow table caption to contain "+" 2018-10-05 11:58:41 +03:00
John MacFarlane 13f8f3c1a8 HTML, Muse reader tests: reduce time taken by round-trip test. 2018-09-27 09:47:09 -07:00
Alexander Krotov 389ffa3045 Muse reader tests: more tests
Check that indented blocks that end in self-terminating blocks (such as block tags and verse) can be terminated by paragraphs.
2018-09-22 20:28:11 +03:00
Alexander Krotov dd5d234c6a Muse reader: do not allow code markup to be followed by digit 2018-09-21 13:07:56 +03:00
Alexander Krotov 0ac3512cfe Muse reader tests: accept Blocks instead of Block in round trip test
This way testcase can be shrinked better up to removing all blocks completely.
2018-09-11 14:22:09 +03:00
Alexander Krotov 0b7001c318 Muse reader: close the </quote> in indented tag test
There is already a separate test for unclosed </quote>.
2018-09-06 19:57:24 +03:00
Alexander Krotov 66f3b00206 Remove redundant $ 2018-09-04 10:53:37 +03:00
Alexander Krotov 02e68859eb Muse reader: autonumber sections in the correct order
Parsing now stops at each section header to ensure the
header is registered before parsing of the next section starts.
2018-09-02 17:37:19 +03:00
Alexander Krotov 23ed97f081 Muse reader: allow newline after opening "*" or "**"
Emacs Muse allows this.
2018-09-02 01:03:43 +03:00
Alexander Krotov 56685e8735 Muse reader: parse <verse> tag in one pass
instead of using parseFromString.

This change makes it possible to have verbatim </verse> tag
inside verse.
2018-08-31 16:43:07 +03:00
Alexander Krotov d74c63d6d3 Fix a typo: s/afeter/after/ 2018-08-30 16:02:46 +03:00
Alexander Krotov 81131ef5d1 Muse reader: don't allow digits after closing marker in lightweight markup
This change makes reader more compatible with Emacs Muse
2018-08-12 21:20:07 +03:00
Alexander Krotov 5fbc981fc2 Muse reader: add support for floating images 2018-05-31 23:31:27 +03:00
Alexander Krotov 1f78efff3b Muse reader: add support for images with specified width 2018-05-31 01:07:51 +03:00
Alexander Krotov 1100bfc0e6 Muse reader: parse image URLs without "guard" and "takeExtension" 2018-05-30 02:29:43 +03:00
Alexander Krotov 6907985e82 Muse reader: test image with space in filename 2018-05-27 22:22:04 +03:00
Alexander Krotov 4d89a1db7f Muse reader: allow nested footnotes 2018-04-26 12:38:17 +03:00
Alexander Krotov ce4326a4f1 Muse reader: allow "-" in anchors 2018-04-19 14:17:59 +03:00
Alexander Krotov a8122987fc Muse reader: allow verse to be indented
Muse writer indents verse blocks in definition list more than necessary, so Muse reader should parse them.
2018-04-16 15:08:34 +03:00